Skip to content

Commit

Permalink
[GH-13] titivated
Browse files Browse the repository at this point in the history
  • Loading branch information
karmaniverous committed Apr 24, 2024
1 parent 398d286 commit 7bdfc83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { createReduxMiddleware } from './createReduxMiddleware/createReduxMiddle
export { deserify } from './deserify/deserify';
export { defaultOptions, type DefaultTypeMap } from './options/defaultOptions';
export { serify, staticTypeProperty } from './serify/serify';
export type { SerifiableTypeMap, SerifyOptions } from './types';
3 changes: 1 addition & 2 deletions src/test/Custom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defaultOptions, type DefaultTypeMap } from '../options/defaultOptions';
import { type SerifyOptions } from '../types';
import { defaultOptions, type DefaultTypeMap, type SerifyOptions } from '../';

export class Custom {
constructor(public p: number) {}
Expand Down
9 changes: 4 additions & 5 deletions src/test/CustomFoo.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
defaultOptions,
type DefaultTypeMap,
} from '../options/defaultOptions.js';
import { staticTypeProperty } from '../serify/serify.js';
import { type SerifyOptions } from '../types.js';
import { Custom } from './Custom.js';
type SerifyOptions,
staticTypeProperty,
} from '../';

export class CustomFoo {
static [staticTypeProperty] = 'Foo';
Expand All @@ -22,7 +21,7 @@ export const customFooOptions: SerifyOptions<CustomFooTypeMap> = {
...defaultOptions.types,
Foo: {
serifier: (value) => value.p,
deserifier: (value) => new Custom(value),
deserifier: (value) => new CustomFoo(value),
},
},
};

0 comments on commit 7bdfc83

Please sign in to comment.