@eveble/eveble
Hierarchy
- Serializer
Implemented by
Index
Methods
- clone
- equals
- fromData
- fromJSONValue
- getType
- getTypeOrThrow
- getTypes
- getTypesNames
- hasType
- isTypeInstance
- overrideType
- parse
- registerType
- removeType
- removeTypes
- stringify
- toData
- toJSONValue
Methods
clone
▸ clone‹T›(value
: T): T
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
value | T |
Returns: T
▸ clone‹T›(value
: T): T
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
value | T |
Returns: T
equals
▸ equals(a
: any, b
: any, options?
: object): boolean
Parameters:
▪ a: any
▪ b: any
▪Optional
options: object
Name | Type |
---|---|
keyOrderSensitive | boolean |
Returns: boolean
▸ equals(a
: any, b
: any, options?
: object): boolean
Parameters:
▪ a: any
▪ b: any
▪Optional
options: object
Name | Type |
---|---|
keyOrderSensitive | boolean |
Returns: boolean
fromData
▸ fromData(data
: Record‹string | number, any›): Record‹string | number, any›
Parameters:
Name | Type |
---|---|
data | Record‹string | number, any› |
Returns: Record‹string | number, any›
▸ fromData(data
: Record‹string | number, any›): Record‹string | number, any›
Parameters:
Name | Type |
---|---|
data | Record‹string | number, any› |
Returns: Record‹string | number, any›
fromJSONValue
▸ fromJSONValue(value
: Record‹string, any›): Record‹string, any› | Serializable
Parameters:
Name | Type |
---|---|
value | Record‹string, any› |
Returns: Record‹string, any› | Serializable
▸ fromJSONValue(value
: Record‹string, any›): Record‹string, any› | Serializable
Parameters:
Name | Type |
---|---|
value | Record‹string, any› |
Returns: Record‹string, any› | Serializable
getType
▸ getType(typeName
: TypeName): Type | undefined
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: Type | undefined
▸ getType(typeName
: TypeName): Type | undefined
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: Type | undefined
getTypeOrThrow
▸ getTypeOrThrow(typeName
: TypeName): Type
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: Type
▸ getTypeOrThrow(typeName
: TypeName): Type
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: Type
getTypes
▸ getTypes(): Map‹TypeName, Type›
▸ getTypes(): Map‹TypeName, Type›
getTypesNames
▸ getTypesNames(): TypeName[]
Returns: TypeName[]
▸ getTypesNames(): TypeName[]
Returns: TypeName[]
hasType
▸ hasType(typeName
: TypeName): boolean
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: boolean
▸ hasType(typeName
: TypeName): boolean
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: boolean
isTypeInstance
▸ isTypeInstance(typeInstance
: Serializable): boolean
Parameters:
Name | Type |
---|---|
typeInstance | Serializable |
Returns: boolean
▸ isTypeInstance(typeInstance
: Serializable): boolean
Parameters:
Name | Type |
---|---|
typeInstance | Serializable |
Returns: boolean
overrideType
▸ overrideType(typeName
: TypeName, type
: Type): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
type | Type |
Returns: void
▸ overrideType(typeName
: TypeName, type
: Type): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
type | Type |
Returns: void
parse
▸ parse(str
: string): any
Parameters:
Name | Type |
---|---|
str | string |
Returns: any
▸ parse(str
: string): any
Parameters:
Name | Type |
---|---|
str | string |
Returns: any
registerType
▸ registerType(typeName
: TypeName, type
: Type, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
type | Type |
shouldOverride? | boolean |
Returns: void
▸ registerType(typeName
: TypeName, type
: Type, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
type | Type |
shouldOverride? | boolean |
Returns: void
removeType
▸ removeType(typeName
: TypeName): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: void
▸ removeType(typeName
: TypeName): void
Parameters:
Name | Type |
---|---|
typeName | TypeName |
Returns: void
removeTypes
▸ removeTypes(): void
Returns: void
▸ removeTypes(): void
Returns: void
stringify
▸ stringify(value
: any, options?
: object): string
Parameters:
▪ value: any
▪Optional
options: object
Name | Type |
---|---|
canonical | boolean |
indent | boolean | number |
Returns: string
▸ stringify(value
: any, options?
: object): string
Parameters:
▪ value: any
▪Optional
options: object
Name | Type |
---|---|
canonical | boolean |
indent | boolean | number |
Returns: string
toData
▸ toData(arg
: Record‹string | number, any›): Record‹string | number, any›
Parameters:
Name | Type |
---|---|
arg | Record‹string | number, any› |
Returns: Record‹string | number, any›
▸ toData(arg
: Record‹string | number, any›): Record‹string | number, any›
Parameters:
Name | Type |
---|---|
arg | Record‹string | number, any› |
Returns: Record‹string | number, any›
toJSONValue
▸ toJSONValue(value
: any): any
Parameters:
Name | Type |
---|---|
value | any |
Returns: any
▸ toJSONValue(value
: any): any
Parameters:
Name | Type |
---|---|
value | any |
Returns: any