- Preparing search index...
- The search index is not available
Documentation
Function parseJsonDefault
- parseJsonDefault<T>(input: string, defaultValue: T, isT: ((t: unknown) => t is T)): T
-
Parameters
-
input: string
-
defaultValue: T
-
isT: ((t: unknown) => t is T)
-
- (t: unknown): t is T
-
Returns t is T
Returns T
Function that does a JSON.parse() combined with a type check, taking a default value that is returned in case the JSON.parse() was unsuccessful