main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | import type { LineCounter } from './parse/line-counter';
|
---|
2 | export type ErrorCode = 'ALIAS_PROPS' | 'BAD_ALIAS' | 'BAD_DIRECTIVE' | 'BAD_DQ_ESCAPE' | 'BAD_INDENT' | 'BAD_PROP_ORDER' | 'BAD_SCALAR_START' | 'BLOCK_AS_IMPLICIT_KEY' | 'BLOCK_IN_FLOW' | 'DUPLICATE_KEY' | 'IMPOSSIBLE' | 'KEY_OVER_1024_CHARS' | 'MISSING_CHAR' | 'MULTILINE_IMPLICIT_KEY' | 'MULTIPLE_ANCHORS' | 'MULTIPLE_DOCS' | 'MULTIPLE_TAGS' | 'TAB_AS_INDENT' | 'TAG_RESOLVE_FAILED' | 'UNEXPECTED_TOKEN' | 'BAD_COLLECTION_TYPE';
|
---|
3 | export type LinePos = {
|
---|
4 | line: number;
|
---|
5 | col: number;
|
---|
6 | };
|
---|
7 | export declare class YAMLError extends Error {
|
---|
8 | name: 'YAMLParseError' | 'YAMLWarning';
|
---|
9 | code: ErrorCode;
|
---|
10 | message: string;
|
---|
11 | pos: [number, number];
|
---|
12 | linePos?: [LinePos] | [LinePos, LinePos];
|
---|
13 | constructor(name: YAMLError['name'], pos: [number, number], code: ErrorCode, message: string);
|
---|
14 | }
|
---|
15 | export declare class YAMLParseError extends YAMLError {
|
---|
16 | constructor(pos: [number, number], code: ErrorCode, message: string);
|
---|
17 | }
|
---|
18 | export declare class YAMLWarning extends YAMLError {
|
---|
19 | constructor(pos: [number, number], code: ErrorCode, message: string);
|
---|
20 | }
|
---|
21 | export declare const prettifyError: (src: string, lc: LineCounter) => (error: YAMLError) => void;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.