oops sorry ts it was my bad
This commit is contained in:
parent
b735066f1c
commit
5d4591e63c
2 changed files with 1 additions and 2 deletions
|
@ -30,7 +30,6 @@ function getSerialize<T, U>(value: U, registry: Registry): Serialize<T> {
|
|||
|
||||
return registry.serializers.get(PrimitivePrototype[typeof value]) || defaultSerialize as Serialize<T>
|
||||
}
|
||||
|
||||
function defaultSerialize<T, U, S extends ISerializer<T>>(serializer: S, value: U): T {
|
||||
switch (typeof value) {
|
||||
case 'string': return serializer.serializeString(value)
|
||||
|
|
|
@ -77,6 +77,6 @@ export class Serializer<T> implements ISerializer<T> {
|
|||
}
|
||||
|
||||
export interface Serialize<T> {
|
||||
<U, S extends ISerializer<U>>(serializer: S, value: T): U
|
||||
<U>(serializer: ISerializer<T>, value: U): T
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue