MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / AnyType

Class AnyType

packages/repository/src/types/any.ts:13–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 * Any type
12 */
13export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected