(json: any, expectedType: Serializable<T>)
| 63 | } |
| 64 | |
| 65 | export function parseToJSObject<T>(json: any, expectedType: Serializable<T>): Object { |
| 66 | if (typeof json !== 'string' || shouldOmitParseString(json, expectedType)) { |
| 67 | return json; |
| 68 | } |
| 69 | return JSON.parse(json); |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Determines if 'A' is a sub-type of 'B' (or if 'A' equals 'B'). |
no test coverage detected