-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Hello,
is there any example for using @Serialize.Custom with this optinal properties in the TypeSerializer<TSerialized, TOriginal> interface?
/**
* _Optional._ Original type constructor function.
* Default: Value of `design:type` for given property.
*/
type?: Constructable.Default<TOriginal>;
/**
* _Optional._ Property type descriminator function.
* Used to narrow type constructor function (e.g. for union types)
* @param serialized Serialized value
* @returns Original type constructor function
*/
discriminate?(this: void, serialized: TSerialized): Constructable.Default<TOriginal>;
I google the code go in deep for the inflate and deflate function and can not even find, that this two properties are used. I want to use the discriminate function to map the name of a type, stored in a serialized string property to a type via a "typemapper".
Thanks for help!
Georg