MCPcopy Create free account
hub / github.com/dipscope/TypeManager.TS / parse

Method parse

src/type-manager.ts:1061–1064  ·  view source on GitHub ↗

* Converts a JavaScript Object Notation (JSON) string into a type in static context. * * @param {TypeFn } typeFn Type function. * @param {string} x A valid JSON string. * @param {Function} reviver A function that transforms the results. This function is called for each m

(typeFn: TypeFn<TObject>, x: string, reviver?: (this: any, key: string, value: any) => any)

Source from the content-addressed store, hash-verified

1059 * @returns {TypeLike<TObject>} Type created from provided input value or undefined.
1060 */
1061 public static parse<TObject>(typeFn: TypeFn<TObject>, x: string, reviver?: (this: any, key: string, value: any) => any): TypeLike<TObject>
1062 {
1063 return this.staticTypeManager.parse(typeFn, x, reviver);
1064 }
1065
1066 /**
1067 * Converts a JavaScript Object Notation (JSON) string into a type.

Callers 2

jsonParseFunction · 0.80

Calls 2

deserializeMethod · 0.95
jsonParseFunction · 0.90

Tested by

no test coverage detected