ParseOptions: {
    intAsBigInt?: boolean;
    keepSourceTokens?: boolean;
    lineCounter?: LineCounter;
    prettyErrors?: boolean;
    strict?: boolean;
    uniqueKeys?: boolean | ((a, b) => boolean);
}

Type declaration

  • Optional intAsBigInt?: boolean

    Whether integers should be parsed into BigInt rather than number values.

    Default: false

    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/BigInt

  • Optional keepSourceTokens?: boolean

    Include a srcToken value on each parsed Node, containing the CST token that was composed into this node.

    Default: false

  • Optional lineCounter?: LineCounter

    If set, newlines will be tracked, to allow for lineCounter.linePos(offset) to provide the { line, col } positions within the input.

  • Optional prettyErrors?: boolean

    Include line/col position & node type directly in parse errors.

    Default: true

  • Optional strict?: boolean

    Detect and report errors that are required by the YAML 1.2 spec, but are caused by unambiguous content.

    Default: true

  • Optional uniqueKeys?: boolean | ((a, b) => boolean)

    YAML requires map keys to be unique. By default, this is checked by comparing scalar values with ===; deep equality is not checked for aliases or collections. If merge keys are enabled by the schema, multiple << keys are allowed.

    Set false to disable, or provide your own comparator function to customise. The comparator will be passed two ParsedNode values, and is expected to return a boolean indicating their equality.

    Default: true

Generated using TypeDoc