parseJsonc
parseJsonc(
text,sourceLabel?):unknown
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/config/jsonc.ts:29
Parse a JSONC string (JSON + comments + trailing commas) into a value.
On success returns the parsed value. On a structural error (anything JSON.parse
would also reject, e.g. a missing brace or a dangling property) it throws a SyntaxError
whose message names the first problem and its 0-based character offset, so the loader’s
existing “Failed to read config …” diagnostics stay actionable.
Parameters
Section titled “Parameters”string
The file contents.
sourceLabel?
Section titled “sourceLabel?”string
Optional human-readable source name, included in the error message.
Returns
Section titled “Returns”unknown