| 11 | * Any type |
| 12 | */ |
| 13 | export class AnyType implements Type<any> { |
| 14 | readonly name = 'any'; |
| 15 | |
| 16 | isInstance(value: any) { |
| 17 | return true; |
| 18 | } |
| 19 | |
| 20 | isCoercible(value: any) { |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | defaultValue(): any { |
| 25 | return undefined; |
| 26 | } |
| 27 | |
| 28 | coerce(value: any) { |
| 29 | return value; |
| 30 | } |
| 31 | |
| 32 | serialize(value: any) { |
| 33 | if (value && typeof value.toJSON === 'function') { |
| 34 | return value.toJSON(); |
| 35 | } |
| 36 | return value; |
| 37 | } |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected