1 | import { ErrorLike } from './errors';
|
2 | /**
|
3 | * Parses the JSON input using an error-tolerant "JSONC" parser. If an error occurs, it is returned as a value
|
4 | * instead of being thrown. This is useful when input is parsed in the background (not in response to any specific
|
5 | * user action), because it makes it easier to save the error and only show it to the user when it matters (for
|
6 | * some interactive user action).
|
7 | */
|
8 | export declare function parseJSONCOrError<T>(input: string): T | ErrorLike;
|