dsh-standards 1.0.2 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/40-checker/README.md +0 -0
- package/40-checker/bin/dsh-plugin-verify.mjs +0 -0
- package/40-checker/fixtures/bad/index.mjs +0 -0
- package/40-checker/fixtures/bad/package.json +0 -0
- package/40-checker/fixtures/bad-manifest/index.js +0 -0
- package/40-checker/fixtures/bad-manifest/package.json +0 -0
- package/40-checker/fixtures/bundle/cordis.patch.yml +0 -0
- package/40-checker/fixtures/bundle/package.json +0 -0
- package/40-checker/fixtures/bundle/server.mjs +0 -0
- package/40-checker/fixtures/bundle-patch-only/cordis.patch.yml +3 -0
- package/40-checker/fixtures/bundle-patch-only/package.json +12 -0
- package/40-checker/fixtures/bundle-v0/cordis.patch.yml +0 -0
- package/40-checker/fixtures/bundle-v0/package.json +0 -0
- package/40-checker/fixtures/bundle-v0/server.mjs +0 -0
- package/40-checker/fixtures/c12-command-arg/index.mjs +7 -0
- package/40-checker/fixtures/c12-command-arg/package.json +10 -0
- package/40-checker/fixtures/c12-comment/index.mjs +3 -0
- package/40-checker/fixtures/c12-comment/package.json +10 -0
- package/40-checker/fixtures/c12-compare/index.mjs +3 -0
- package/40-checker/fixtures/c12-compare/package.json +10 -0
- package/40-checker/fixtures/c12-doc-string/index.mjs +13 -0
- package/40-checker/fixtures/c12-doc-string/package.json +10 -0
- package/40-checker/fixtures/c12-grant/index.mjs +3 -0
- package/40-checker/fixtures/c12-grant/package.json +10 -0
- package/40-checker/fixtures/c12-string/index.mjs +3 -0
- package/40-checker/fixtures/c12-string/package.json +10 -0
- package/40-checker/fixtures/client-missing/client.js +0 -0
- package/40-checker/fixtures/client-missing/index.js +0 -0
- package/40-checker/fixtures/client-missing/package.json +0 -0
- package/40-checker/fixtures/declaration-file/index.d.ts +1 -0
- package/40-checker/fixtures/declaration-file/index.mjs +9 -0
- package/40-checker/fixtures/declaration-file/package.json +10 -0
- package/40-checker/fixtures/flow-config/index.js +0 -0
- package/40-checker/fixtures/flow-config/package.json +0 -0
- package/40-checker/fixtures/fs-write/index.mjs +0 -0
- package/40-checker/fixtures/fs-write/package.json +0 -0
- package/40-checker/fixtures/good/index.mjs +0 -0
- package/40-checker/fixtures/good/package.json +0 -0
- package/40-checker/fixtures/hang/index.mjs +0 -0
- package/40-checker/fixtures/hang/package.json +0 -0
- package/40-checker/fixtures/import-local-side-effect/index.mjs +11 -0
- package/40-checker/fixtures/import-local-side-effect/package.json +21 -0
- package/40-checker/fixtures/import-local-side-effect/side-effectful.mjs +5 -0
- package/40-checker/fixtures/import-open-readonly/index.mjs +14 -0
- package/40-checker/fixtures/import-open-readonly/package.json +19 -0
- package/40-checker/fixtures/import-package-only/index.mjs +11 -0
- package/40-checker/fixtures/import-package-only/package.json +21 -0
- package/40-checker/fixtures/import-parse-error/index.mjs +5 -0
- package/40-checker/fixtures/import-parse-error/package.json +10 -0
- package/40-checker/fixtures/import-side-effect/index.mjs +14 -0
- package/40-checker/fixtures/import-side-effect/package.json +19 -0
- package/40-checker/fixtures/import-side-effect-nonentry/index.mjs +9 -0
- package/40-checker/fixtures/import-side-effect-nonentry/package.json +19 -0
- package/40-checker/fixtures/import-side-effect-nonentry/selfcheck.mjs +8 -0
- package/40-checker/fixtures/import-void-main/index.mjs +16 -0
- package/40-checker/fixtures/import-void-main/package.json +19 -0
- package/40-checker/fixtures/known-answer/expected.json +0 -0
- package/40-checker/fixtures/market-index-real.json +0 -0
- package/40-checker/fixtures/market-index.json +0 -0
- package/40-checker/fixtures/negative/bad-entry/package.json +0 -0
- package/40-checker/fixtures/negative/no-entry/package.json +0 -0
- package/40-checker/fixtures/negative/no-patch/package.json +0 -0
- package/40-checker/fixtures/negative/root-missing/cordis.patch.yml +0 -0
- package/40-checker/fixtures/negative/root-missing/package.json +0 -0
- package/40-checker/fixtures/negative/workspace/package.json +0 -0
- package/40-checker/fixtures/no-source/package.json +19 -0
- package/40-checker/fixtures/parse-error-nonentry/index.mjs +2 -0
- package/40-checker/fixtures/parse-error-nonentry/package.json +10 -0
- package/40-checker/fixtures/parse-error-nonentry/references/broken.js +1 -0
- package/40-checker/package.json +0 -0
- package/40-checker/samples/README.md +0 -0
- package/40-checker/samples/entry18.json +0 -0
- package/40-checker/samples/frame.json +0 -0
- package/40-checker/scripts/apply-overlay.mjs +0 -0
- package/40-checker/scripts/attestation-check.mjs +0 -0
- package/40-checker/scripts/bundle-smoke.mjs +0 -0
- package/40-checker/scripts/claim-check.mjs +0 -0
- package/40-checker/scripts/clause-map.mjs +0 -0
- package/40-checker/scripts/collect-fixtures.mjs +0 -0
- package/40-checker/scripts/dashboard.mjs +0 -0
- package/40-checker/scripts/dco-check.mjs +0 -0
- package/40-checker/scripts/dependabot-check.mjs +0 -0
- package/40-checker/scripts/doc-commands-check.mjs +0 -0
- package/40-checker/scripts/entry-scan.mjs +0 -0
- package/40-checker/scripts/entry-validate.mjs +0 -0
- package/40-checker/scripts/entry18-attribution.mjs +0 -0
- package/40-checker/scripts/entry18-ci.mjs +0 -0
- package/40-checker/scripts/entry18-realweb-summary.mjs +0 -0
- package/40-checker/scripts/entry18-web.mjs +0 -0
- package/40-checker/scripts/evidence-chain.mjs +0 -0
- package/40-checker/scripts/flow-index.mjs +0 -0
- package/40-checker/scripts/flow-sample-ci.mjs +0 -0
- package/40-checker/scripts/governance-check.mjs +0 -0
- package/40-checker/scripts/host-farm.mjs +0 -0
- package/40-checker/scripts/journey-config-observe.mjs +0 -0
- package/40-checker/scripts/journey-disclosure-shape.mjs +0 -0
- package/40-checker/scripts/journey-runtime.mjs +0 -0
- package/40-checker/scripts/journey.mjs +0 -0
- package/40-checker/scripts/label-drift.mjs +0 -0
- package/40-checker/scripts/label-sync.mjs +0 -0
- package/40-checker/scripts/label-verify.mjs +0 -0
- package/40-checker/scripts/landlock-exec.c +0 -0
- package/40-checker/scripts/level-audit.mjs +0 -0
- package/40-checker/scripts/m1-sidecar.mjs +0 -0
- package/40-checker/scripts/m2-runner.mjs +0 -0
- package/40-checker/scripts/round-robin.mjs +0 -0
- package/40-checker/scripts/runtime-child.mjs +0 -0
- package/40-checker/scripts/sample-frame.mjs +0 -0
- package/40-checker/scripts/sample20-ci.mjs +0 -0
- package/40-checker/scripts/sample60-ci.mjs +0 -0
- package/40-checker/scripts/stale-check.mjs +0 -0
- package/40-checker/scripts/surveillance.mjs +0 -0
- package/40-checker/scripts/web-probe.mjs +0 -0
- package/40-checker/src/cli.mjs +1 -1
- package/40-checker/src/client-shape.mjs +0 -0
- package/40-checker/src/declarations.mjs +514 -19
- package/40-checker/src/index.mjs +0 -0
- package/40-checker/src/install-spec.mjs +0 -0
- package/40-checker/src/label.mjs +0 -0
- package/40-checker/src/manifest.mjs +5 -0
- package/40-checker/src/permissions.mjs +0 -0
- package/40-checker/src/report.mjs +0 -0
- package/40-checker/src/result.mjs +0 -0
- package/40-checker/src/runtime.mjs +0 -0
- package/40-checker/src/semver.mjs +0 -0
- package/40-checker/src/util.mjs +0 -0
- package/40-checker/test/attestation.test.mjs +0 -0
- package/40-checker/test/checks.test.mjs +243 -1
- package/40-checker/test/claim.test.mjs +0 -0
- package/40-checker/test/client-shape.test.mjs +0 -0
- package/40-checker/test/dco.test.mjs +0 -0
- package/40-checker/test/entry-validate.test.mjs +0 -0
- package/40-checker/test/governance.test.mjs +0 -0
- package/40-checker/test/label.test.mjs +0 -0
- package/40-checker/test/level-audit.test.mjs +0 -0
- package/40-checker/test/levels.test.mjs +0 -0
- package/40-checker/test/ops.test.mjs +0 -0
- package/40-checker/test/permissions.test.mjs +0 -0
- package/40-checker/test/semver.test.mjs +0 -0
- package/40-checker/test/verify.test.mjs +0 -0
- package/40-checker/vendor/babel/README.md +10 -0
- package/40-checker/vendor/babel/index.cjs +3 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/LICENSE +22 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/README.md +19 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.d.ts +41 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.js +286 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/package.json +31 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier-browser.js +62 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js +60 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.d.ts +28 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.js +27 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/package.json +45 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/CHANGELOG.md +1073 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/LICENSE +19 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/README.md +19 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/bin/babel-parser.js +14 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.d.ts +1047 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.js +14612 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/package.json +57 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/typings/babel-parser.d.ts +636 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/LICENSE +22 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/README.md +19 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index-legacy.d.ts +2765 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.d.ts +3668 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js +10758 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js.flow +2618 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/package.json +38 -0
- package/CHANGELOG.md +50 -0
- package/LICENSE +0 -0
- package/LICENSE-APACHE +0 -0
- package/LICENSE-CC-BY +0 -0
- package/NOTICE +0 -0
- package/NOTICE.md +0 -0
- package/README.md +0 -0
- package/bin/dsh-levels.mjs +0 -0
- package/bin/dsh-standards.mjs +0 -0
- package/docs/BOOST-FIXTURES-2026-11-02.md +0 -0
- package/docs/DEVELOPER-JOURNEY.md +0 -0
- package/docs/HOST-J3-BUG-REPORT-DRAFT.md +0 -0
- package/docs/HOST-J3-CONFIG-REPRO-2026-11-02.md +0 -0
- package/docs/NAMING-FALLBACK.md +0 -0
- package/docs/fork-policy.md +0 -0
- package/docs/full-test-plan-2026-11-02.md +0 -0
- package/docs/incident.md +0 -0
- package/docs/onboarding.md +0 -0
- package/docs/privacy.md +0 -0
- package/docs/release.md +0 -0
- package/docs/scope-security.md +0 -0
- package/docs/status-taxonomy.md +0 -0
- package/docs/sunset.md +0 -0
- package/docs/translating.md +0 -0
- package/package.json +2 -1
- package/spec/README.md +0 -0
- package/spec/boost/README.md +0 -0
- package/spec/clauses.json +0 -0
- package/spec/entry/README.md +0 -0
- package/spec/flow/README.md +0 -0
- package/spec/levels.json +0 -0
- package/spec/levels.schema.json +0 -0
- package/spec/reference-suite.json +0 -0
- package/spec/schemas/attestation.schema.json +0 -0
- package/spec/schemas/evidence.schema.json +0 -0
- package/spec/schemas/report.schema.json +0 -0
|
@@ -0,0 +1,1047 @@
|
|
|
1
|
+
import * as _babel_types from '@babel/types';
|
|
2
|
+
import { File, Expression } from '@babel/types';
|
|
3
|
+
export { Expression, File } from '@babel/types';
|
|
4
|
+
|
|
5
|
+
declare const UnparenthesizedPipeBodyDescriptions: Set<"AssignmentExpression" | "ArrowFunctionExpression" | "ConditionalExpression" | "YieldExpression">;
|
|
6
|
+
type GetSetMemberType<T extends Set<any>> = T extends Set<infer M> ? M : unknown;
|
|
7
|
+
type UnparenthesizedPipeBodyTypes = GetSetMemberType<typeof UnparenthesizedPipeBodyDescriptions>;
|
|
8
|
+
declare const _default$5: {
|
|
9
|
+
PipeTopicRequiresHackPipes: string;
|
|
10
|
+
PipeTopicUnbound: string;
|
|
11
|
+
PipeTopicUnconfiguredToken: ({ token }: {
|
|
12
|
+
token: string;
|
|
13
|
+
}) => string;
|
|
14
|
+
PipeTopicUnused: string;
|
|
15
|
+
PipeUnparenthesizedBody: ({ type }: {
|
|
16
|
+
type: UnparenthesizedPipeBodyTypes;
|
|
17
|
+
}) => string;
|
|
18
|
+
PipelineUnparenthesized: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare class Position {
|
|
22
|
+
line: number;
|
|
23
|
+
column: number;
|
|
24
|
+
index: number;
|
|
25
|
+
constructor(line: number, col: number, index?: number);
|
|
26
|
+
}
|
|
27
|
+
declare class SourceLocation {
|
|
28
|
+
start: Position;
|
|
29
|
+
end: Position;
|
|
30
|
+
filename: string | undefined;
|
|
31
|
+
identifierName: string | undefined | null;
|
|
32
|
+
constructor(start: Position, end?: Position);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const _default$4: {
|
|
36
|
+
ImportMetaOutsideModule: {
|
|
37
|
+
message: string;
|
|
38
|
+
code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
|
|
39
|
+
};
|
|
40
|
+
ImportOutsideModule: {
|
|
41
|
+
message: string;
|
|
42
|
+
code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=module-errors.d.ts.map
|
|
46
|
+
|
|
47
|
+
type LValAncestor = {
|
|
48
|
+
type: "UpdateExpression";
|
|
49
|
+
prefix: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
type: "ArrayPattern" | "AssignmentExpression" | "CatchClause" | "ForOfStatement" | "FormalParameters" | "ForInStatement" | "ForStatement" | "ImportSpecifier" | "ImportNamespaceSpecifier" | "ImportDefaultSpecifier" | "ParenthesizedExpression" | "ObjectPattern" | "RestElement" | "VariableDeclarator";
|
|
52
|
+
};
|
|
53
|
+
declare const _default$3: {
|
|
54
|
+
AccessorIsGenerator: ({ kind }: {
|
|
55
|
+
kind: "get" | "set";
|
|
56
|
+
}) => string;
|
|
57
|
+
ArgumentsInClass: string;
|
|
58
|
+
AsyncFunctionInSingleStatementContext: string;
|
|
59
|
+
AwaitBindingIdentifier: string;
|
|
60
|
+
AwaitBindingIdentifierInStaticBlock: string;
|
|
61
|
+
AwaitExpressionFormalParameter: string;
|
|
62
|
+
AwaitUsingNotInAsyncContext: string;
|
|
63
|
+
AwaitNotInAsyncContext: string;
|
|
64
|
+
BadGetterArity: string;
|
|
65
|
+
BadSetterArity: string;
|
|
66
|
+
BadSetterRestParameter: string;
|
|
67
|
+
ConstructorClassField: string;
|
|
68
|
+
ConstructorClassPrivateField: string;
|
|
69
|
+
ConstructorIsAccessor: string;
|
|
70
|
+
ConstructorIsAsync: string;
|
|
71
|
+
ConstructorIsGenerator: string;
|
|
72
|
+
DeclarationMissingInitializer: ({ kind, }: {
|
|
73
|
+
kind: "await using" | "const" | "destructuring" | "using";
|
|
74
|
+
}) => string;
|
|
75
|
+
DecoratorArgumentsOutsideParentheses: string;
|
|
76
|
+
DecoratorsBeforeAfterExport: string;
|
|
77
|
+
DecoratorConstructor: string;
|
|
78
|
+
DecoratorSemicolon: string;
|
|
79
|
+
DecoratorStaticBlock: string;
|
|
80
|
+
DeferImportRequiresNamespace: string;
|
|
81
|
+
DeferExportInvalidAll: string;
|
|
82
|
+
DeletePrivateField: string;
|
|
83
|
+
DestructureNamedImport: string;
|
|
84
|
+
DuplicateConstructor: string;
|
|
85
|
+
DuplicateDefaultExport: string;
|
|
86
|
+
DuplicateExport: ({ exportName }: {
|
|
87
|
+
exportName: string;
|
|
88
|
+
}) => string;
|
|
89
|
+
DuplicateProto: string;
|
|
90
|
+
DuplicateRegExpFlags: string;
|
|
91
|
+
ElementAfterRest: string;
|
|
92
|
+
EscapedCharNotAnIdentifier: string;
|
|
93
|
+
ExportBindingIsString: ({ localName, exportName, }: {
|
|
94
|
+
localName: string;
|
|
95
|
+
exportName: string;
|
|
96
|
+
}) => string;
|
|
97
|
+
ExportDefaultFromAsIdentifier: string;
|
|
98
|
+
FilteredNamespaceDuplicateName: ({ name }: {
|
|
99
|
+
name: string;
|
|
100
|
+
}) => string;
|
|
101
|
+
FilteredNamespaceRename: string;
|
|
102
|
+
FilteredNamespaceTypeModifier: string;
|
|
103
|
+
ForInOfLoopInitializer: ({ type, }: {
|
|
104
|
+
type: "ForInStatement" | "ForOfStatement";
|
|
105
|
+
}) => string;
|
|
106
|
+
ForInUsing: string;
|
|
107
|
+
ForOfAsync: string;
|
|
108
|
+
ForOfLet: string;
|
|
109
|
+
GeneratorInSingleStatementContext: string;
|
|
110
|
+
IllegalBreakContinue: ({ type, }: {
|
|
111
|
+
type: "BreakStatement" | "ContinueStatement";
|
|
112
|
+
}) => string;
|
|
113
|
+
IllegalLanguageModeDirective: string;
|
|
114
|
+
IllegalReturn: string;
|
|
115
|
+
ImportBindingIsString: ({ importName }: {
|
|
116
|
+
importName: string;
|
|
117
|
+
}) => string;
|
|
118
|
+
ImportCallArity: ({ phase, sync, }: {
|
|
119
|
+
phase?: string | null;
|
|
120
|
+
sync?: boolean | null;
|
|
121
|
+
}) => string;
|
|
122
|
+
ImportCallNotNewExpression: ({ phase, sync, }: {
|
|
123
|
+
phase?: string | null;
|
|
124
|
+
sync?: boolean | null;
|
|
125
|
+
}) => string;
|
|
126
|
+
ImportCallSpreadArgument: ({ phase, sync, }: {
|
|
127
|
+
phase?: string | null;
|
|
128
|
+
sync?: boolean | null;
|
|
129
|
+
}) => string;
|
|
130
|
+
IncompatibleRegExpUVFlags: string;
|
|
131
|
+
InvalidBigIntLiteral: string;
|
|
132
|
+
InvalidCodePoint: string;
|
|
133
|
+
InvalidCoverDiscardElement: string;
|
|
134
|
+
InvalidCoverInitializedName: string;
|
|
135
|
+
InvalidDigit: ({ radix }: {
|
|
136
|
+
radix: number;
|
|
137
|
+
}) => string;
|
|
138
|
+
InvalidEscapeSequence: string;
|
|
139
|
+
InvalidEscapeSequenceTemplate: string;
|
|
140
|
+
InvalidEscapedReservedWord: ({ reservedWord }: {
|
|
141
|
+
reservedWord: string;
|
|
142
|
+
}) => string;
|
|
143
|
+
InvalidIdentifier: ({ identifierName }: {
|
|
144
|
+
identifierName: string;
|
|
145
|
+
}) => string;
|
|
146
|
+
InvalidLhs: ({ ancestor }: {
|
|
147
|
+
ancestor: LValAncestor;
|
|
148
|
+
}) => string;
|
|
149
|
+
InvalidLhsBinding: ({ ancestor }: {
|
|
150
|
+
ancestor: LValAncestor;
|
|
151
|
+
}) => string;
|
|
152
|
+
InvalidLhsOptionalChaining: ({ ancestor }: {
|
|
153
|
+
ancestor: LValAncestor;
|
|
154
|
+
}) => string;
|
|
155
|
+
InvalidOrMissingExponent: string;
|
|
156
|
+
InvalidOrUnexpectedToken: ({ unexpected }: {
|
|
157
|
+
unexpected: string;
|
|
158
|
+
}) => string;
|
|
159
|
+
InvalidParenthesizedAssignment: string;
|
|
160
|
+
InvalidPrivateFieldResolution: ({ identifierName, }: {
|
|
161
|
+
identifierName: string;
|
|
162
|
+
}) => string;
|
|
163
|
+
InvalidPropertyBindingPattern: string;
|
|
164
|
+
InvalidRestAssignmentPattern: string;
|
|
165
|
+
LabelRedeclaration: ({ labelName }: {
|
|
166
|
+
labelName: string;
|
|
167
|
+
}) => string;
|
|
168
|
+
LetInLexicalBinding: string;
|
|
169
|
+
LineTerminatorBeforeArrow: string;
|
|
170
|
+
MalformedRegExpFlags: string;
|
|
171
|
+
MissingClassName: string;
|
|
172
|
+
MissingEqInAssignment: string;
|
|
173
|
+
MissingSemicolon: string;
|
|
174
|
+
MissingPlugin: ({ missingPlugin }: {
|
|
175
|
+
missingPlugin: [string];
|
|
176
|
+
}) => string;
|
|
177
|
+
MissingOneOfPlugins: ({ missingPlugin }: {
|
|
178
|
+
missingPlugin: string[];
|
|
179
|
+
}) => string;
|
|
180
|
+
MissingUnicodeEscape: string;
|
|
181
|
+
MixingCoalesceWithLogical: string;
|
|
182
|
+
ModuleAttributeInvalidValue: string;
|
|
183
|
+
ModuleAttributesWithDuplicateKeys: ({ key }: {
|
|
184
|
+
key: string;
|
|
185
|
+
}) => string;
|
|
186
|
+
ModuleExportNameHasLoneSurrogate: ({ surrogateCharCode, }: {
|
|
187
|
+
surrogateCharCode: number;
|
|
188
|
+
}) => string;
|
|
189
|
+
ModuleExportUndefined: ({ localName }: {
|
|
190
|
+
localName: string;
|
|
191
|
+
}) => string;
|
|
192
|
+
MultipleDefaultsInSwitch: string;
|
|
193
|
+
NewlineAfterThrow: string;
|
|
194
|
+
NoCatchOrFinally: string;
|
|
195
|
+
NumberIdentifier: string;
|
|
196
|
+
NumericSeparatorInEscapeSequence: string;
|
|
197
|
+
ObsoleteAwaitStar: string;
|
|
198
|
+
OptionalChainingNoNew: string;
|
|
199
|
+
OptionalChainingNoTemplate: string;
|
|
200
|
+
OverrideOnConstructor: string;
|
|
201
|
+
ParamDupe: string;
|
|
202
|
+
PatternHasAccessor: string;
|
|
203
|
+
PatternHasMethod: string;
|
|
204
|
+
PrivateInExpectedIn: ({ identifierName }: {
|
|
205
|
+
identifierName: string;
|
|
206
|
+
}) => string;
|
|
207
|
+
PrivateNameRedeclaration: ({ identifierName }: {
|
|
208
|
+
identifierName: string;
|
|
209
|
+
}) => string;
|
|
210
|
+
RestTrailingComma: string;
|
|
211
|
+
SloppyFunction: string;
|
|
212
|
+
SloppyFunctionAnnexB: string;
|
|
213
|
+
SourcePhaseImportRequiresDefault: string;
|
|
214
|
+
StaticPrototype: string;
|
|
215
|
+
SuperCallNotNewExpression: string;
|
|
216
|
+
SuperNotAllowed: string;
|
|
217
|
+
SuperPrivateField: string;
|
|
218
|
+
TrailingDecorator: string;
|
|
219
|
+
UnexpectedArgumentPlaceholder: string;
|
|
220
|
+
UnexpectedDigitAfterHash: string;
|
|
221
|
+
UnexpectedImportExport: string;
|
|
222
|
+
UnexpectedKeyword: ({ keyword }: {
|
|
223
|
+
keyword: string;
|
|
224
|
+
}) => string;
|
|
225
|
+
UnexpectedLeadingDecorator: string;
|
|
226
|
+
UnexpectedLexicalDeclaration: string;
|
|
227
|
+
UnexpectedNewTarget: string;
|
|
228
|
+
UnexpectedNumericSeparator: string;
|
|
229
|
+
UnexpectedPrivateField: string;
|
|
230
|
+
UnexpectedReservedWord: ({ reservedWord }: {
|
|
231
|
+
reservedWord: string;
|
|
232
|
+
}) => string;
|
|
233
|
+
UnexpectedSuper: string;
|
|
234
|
+
UnexpectedToken: ({ expected, unexpected, }: {
|
|
235
|
+
expected?: string | null;
|
|
236
|
+
unexpected?: string | null;
|
|
237
|
+
}) => string;
|
|
238
|
+
UnexpectedTokenUnaryExponentiation: string;
|
|
239
|
+
UnexpectedUsingDeclaration: string;
|
|
240
|
+
UnexpectedVoidPattern: string;
|
|
241
|
+
UnsupportedDecoratorExport: string;
|
|
242
|
+
UnsupportedDefaultExport: string;
|
|
243
|
+
UnsupportedImport: string;
|
|
244
|
+
UnsupportedMetaProperty: ({ target, onlyValidPropertyName, }: {
|
|
245
|
+
target: string;
|
|
246
|
+
onlyValidPropertyName: string;
|
|
247
|
+
}) => string;
|
|
248
|
+
UnsupportedParameterDecorator: string;
|
|
249
|
+
UnsupportedPropertyDecorator: string;
|
|
250
|
+
UnsupportedSuper: string;
|
|
251
|
+
UnterminatedComment: string;
|
|
252
|
+
UnterminatedRegExp: string;
|
|
253
|
+
UnterminatedString: string;
|
|
254
|
+
UnterminatedTemplate: string;
|
|
255
|
+
UsingDeclarationExport: string;
|
|
256
|
+
UsingDeclarationHasBindingPattern: string;
|
|
257
|
+
VarRedeclaration: ({ identifierName }: {
|
|
258
|
+
identifierName: string;
|
|
259
|
+
}) => string;
|
|
260
|
+
VoidPatternCatchClauseParam: string;
|
|
261
|
+
VoidPatternInitializer: string;
|
|
262
|
+
YieldBindingIdentifier: string;
|
|
263
|
+
YieldInParameter: string;
|
|
264
|
+
YieldNotInGeneratorFunction: string;
|
|
265
|
+
ZeroDigitNumericSeparator: string;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
declare const _default$2: {
|
|
269
|
+
StrictDelete: string;
|
|
270
|
+
StrictEvalArguments: ({ referenceName }: {
|
|
271
|
+
referenceName: string;
|
|
272
|
+
}) => string;
|
|
273
|
+
StrictEvalArgumentsBinding: ({ bindingName }: {
|
|
274
|
+
bindingName: string;
|
|
275
|
+
}) => string;
|
|
276
|
+
StrictFunction: string;
|
|
277
|
+
StrictNumericEscape: string;
|
|
278
|
+
StrictOctalLiteral: string;
|
|
279
|
+
StrictWith: string;
|
|
280
|
+
};
|
|
281
|
+
//# sourceMappingURL=strict-mode-errors.d.ts.map
|
|
282
|
+
|
|
283
|
+
declare const _default$1: {
|
|
284
|
+
ParseExpressionEmptyInput: string;
|
|
285
|
+
ParseExpressionExpectsEOF: ({ unexpected }: {
|
|
286
|
+
unexpected: number;
|
|
287
|
+
}) => string;
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=parse-expression-errors.d.ts.map
|
|
290
|
+
|
|
291
|
+
declare const _default: {
|
|
292
|
+
UnsupportedBind: string;
|
|
293
|
+
UnsupportedBindRHS: string;
|
|
294
|
+
};
|
|
295
|
+
//# sourceMappingURL=bind-operator-errors.d.ts.map
|
|
296
|
+
|
|
297
|
+
declare class TokContext {
|
|
298
|
+
constructor(token: string, preserveSpace?: boolean);
|
|
299
|
+
token: string;
|
|
300
|
+
preserveSpace: boolean;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
type TokenOptions = {
|
|
304
|
+
keyword?: string;
|
|
305
|
+
beforeExpr?: boolean;
|
|
306
|
+
startsExpr?: boolean;
|
|
307
|
+
rightAssociative?: boolean;
|
|
308
|
+
isLoop?: boolean;
|
|
309
|
+
isAssign?: boolean;
|
|
310
|
+
prefix?: boolean;
|
|
311
|
+
postfix?: boolean;
|
|
312
|
+
binop?: number | null;
|
|
313
|
+
};
|
|
314
|
+
type TokenType = number;
|
|
315
|
+
declare class ExportedTokenType {
|
|
316
|
+
label: string;
|
|
317
|
+
keyword: string | undefined | null;
|
|
318
|
+
beforeExpr: boolean;
|
|
319
|
+
startsExpr: boolean;
|
|
320
|
+
rightAssociative: boolean;
|
|
321
|
+
isLoop: boolean;
|
|
322
|
+
isAssign: boolean;
|
|
323
|
+
prefix: boolean;
|
|
324
|
+
postfix: boolean;
|
|
325
|
+
binop: number | undefined | null;
|
|
326
|
+
constructor(label: string, conf?: TokenOptions);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
declare const enum LoopLabelKind {
|
|
330
|
+
Loop = 1,
|
|
331
|
+
Switch = 2
|
|
332
|
+
}
|
|
333
|
+
declare class State {
|
|
334
|
+
flags: number;
|
|
335
|
+
accessor strict: boolean;
|
|
336
|
+
startIndex: number;
|
|
337
|
+
curLine: number;
|
|
338
|
+
lineStart: number;
|
|
339
|
+
startLoc: Position;
|
|
340
|
+
endLoc: Position;
|
|
341
|
+
init({ strictMode, sourceType, startIndex, startLine, startColumn, }: OptionsWithDefaults): void;
|
|
342
|
+
errors: ParseError[];
|
|
343
|
+
noArrowAt: number[];
|
|
344
|
+
noArrowParamsConversionAt: number[];
|
|
345
|
+
regExpAllowedAt: number;
|
|
346
|
+
/**
|
|
347
|
+
* Track whether the current start is the start of an AssignmentExpression production.
|
|
348
|
+
* The ArrowFunctionExpression and AsyncArrowFunctionExpression productions can only be
|
|
349
|
+
* parsed if this is true.
|
|
350
|
+
*/
|
|
351
|
+
accessor canStartArrow: boolean;
|
|
352
|
+
accessor inType: boolean;
|
|
353
|
+
accessor noAnonFunctionType: boolean;
|
|
354
|
+
accessor hasFlowComment: boolean;
|
|
355
|
+
accessor isAmbientContext: boolean;
|
|
356
|
+
accessor inAbstractClass: boolean;
|
|
357
|
+
accessor inDisallowConditionalTypesContext: boolean;
|
|
358
|
+
accessor inConditionalConsequent: boolean;
|
|
359
|
+
accessor inHackPipelineBody: boolean;
|
|
360
|
+
accessor seenTopicReference: boolean;
|
|
361
|
+
labels: {
|
|
362
|
+
kind: LoopLabelKind | null;
|
|
363
|
+
name?: string | null;
|
|
364
|
+
statementStart?: number;
|
|
365
|
+
}[];
|
|
366
|
+
commentsLen: number;
|
|
367
|
+
commentStack: CommentWhitespace[];
|
|
368
|
+
pos: number;
|
|
369
|
+
type: TokenType;
|
|
370
|
+
value: any;
|
|
371
|
+
start: number;
|
|
372
|
+
end: number;
|
|
373
|
+
lastTokEndLoc: Position | null;
|
|
374
|
+
lastTokStartLoc: Position | null;
|
|
375
|
+
context: TokContext[];
|
|
376
|
+
accessor canStartJSXElement: boolean;
|
|
377
|
+
accessor containsEsc: boolean;
|
|
378
|
+
firstInvalidTemplateEscapePos: null | Position;
|
|
379
|
+
accessor hasTopLevelAwait: boolean;
|
|
380
|
+
strictErrors: Map<number, [ParseErrorConstructor<object>, Position]>;
|
|
381
|
+
tokensLength: number;
|
|
382
|
+
/**
|
|
383
|
+
* When we add a new property, we must manually update the `clone` method
|
|
384
|
+
* @see State#clone
|
|
385
|
+
*/
|
|
386
|
+
curPosition(): Position;
|
|
387
|
+
clone(): State;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
interface CommentBase {
|
|
391
|
+
type: "CommentBlock" | "CommentLine";
|
|
392
|
+
value: string;
|
|
393
|
+
start?: number | undefined;
|
|
394
|
+
end?: number | undefined;
|
|
395
|
+
loc?: SourceLocation | undefined;
|
|
396
|
+
}
|
|
397
|
+
interface CommentBlock extends CommentBase {
|
|
398
|
+
type: "CommentBlock";
|
|
399
|
+
}
|
|
400
|
+
interface CommentLine extends CommentBase {
|
|
401
|
+
type: "CommentLine";
|
|
402
|
+
}
|
|
403
|
+
type Comment = CommentBlock | CommentLine;
|
|
404
|
+
interface BaseNode {
|
|
405
|
+
leadingComments?: Comment[] | null;
|
|
406
|
+
innerComments?: Comment[] | null;
|
|
407
|
+
trailingComments?: Comment[] | null;
|
|
408
|
+
start?: number | null;
|
|
409
|
+
end?: number | null;
|
|
410
|
+
loc?: SourceLocation | null;
|
|
411
|
+
range?: [number, number];
|
|
412
|
+
extra?: Record<string, unknown>;
|
|
413
|
+
}
|
|
414
|
+
type Accessibility = "public" | "protected" | "private";
|
|
415
|
+
type VarianceAnnotations = "in" | "out";
|
|
416
|
+
/**
|
|
417
|
+
* TSTypeCastExpression is not a valid TS production, the parser
|
|
418
|
+
* generates such code so that it can cast it to a valid pattern or
|
|
419
|
+
* throw an error
|
|
420
|
+
*/
|
|
421
|
+
interface TSTypeCastExpression extends BaseNode {
|
|
422
|
+
type: "TSTypeCastExpression";
|
|
423
|
+
expression: _babel_types.Expression;
|
|
424
|
+
typeAnnotation: _babel_types.TSTypeAnnotation;
|
|
425
|
+
}
|
|
426
|
+
type ESTreeNode = ESTreeClassElement | ESTreeExpression | EstreePrivateIdentifier | EstreeProperty | EstreeRegExpLiteral;
|
|
427
|
+
type ESTreeClassElement = EstreeAccessorProperty | EstreeMethodDefinition | EstreePropertyDefinition | EstreeTSAbstractMethodDefinition | EstreeTSAbstractPropertyDefinition | EstreeTSAbstractAccessorProperty;
|
|
428
|
+
type ESTreeLiteral = EstreeLiteral | EstreeBigIntLiteral;
|
|
429
|
+
type ESTreeExpression = EstreeChainExpression | ESTreeLiteral | EstreeTSEmptyBodyFunctionExpression;
|
|
430
|
+
type Node = _babel_types.Node | ESTreeNode | TSTypeCastExpression;
|
|
431
|
+
interface EstreeLiteral extends BaseNode {
|
|
432
|
+
type: "Literal";
|
|
433
|
+
value: any;
|
|
434
|
+
raw: any;
|
|
435
|
+
}
|
|
436
|
+
interface EstreeRegExpLiteralRegex {
|
|
437
|
+
pattern: string;
|
|
438
|
+
flags: string;
|
|
439
|
+
}
|
|
440
|
+
interface EstreeRegExpLiteral extends EstreeLiteral {
|
|
441
|
+
regex: EstreeRegExpLiteralRegex;
|
|
442
|
+
}
|
|
443
|
+
interface EstreeBigIntLiteral extends EstreeLiteral {
|
|
444
|
+
value: number | null;
|
|
445
|
+
bigint: string;
|
|
446
|
+
}
|
|
447
|
+
interface EstreeProperty extends BaseNode {
|
|
448
|
+
type: "Property";
|
|
449
|
+
method: boolean;
|
|
450
|
+
shorthand: boolean;
|
|
451
|
+
key: _babel_types.Expression | EstreePrivateIdentifier;
|
|
452
|
+
computed: boolean;
|
|
453
|
+
value: _babel_types.Expression;
|
|
454
|
+
decorators: _babel_types.Decorator[];
|
|
455
|
+
kind?: "get" | "set" | "init";
|
|
456
|
+
variance?: _babel_types.Variance | null;
|
|
457
|
+
optional?: boolean;
|
|
458
|
+
}
|
|
459
|
+
interface EstreeMethodDefinitionBase extends BaseNode {
|
|
460
|
+
static: boolean;
|
|
461
|
+
key: _babel_types.Expression;
|
|
462
|
+
computed: boolean;
|
|
463
|
+
decorators: _babel_types.Decorator[];
|
|
464
|
+
kind?: "get" | "set" | "method";
|
|
465
|
+
accessibility?: Accessibility;
|
|
466
|
+
override?: boolean;
|
|
467
|
+
optional?: boolean;
|
|
468
|
+
}
|
|
469
|
+
interface EstreeMethodDefinition extends EstreeMethodDefinitionBase {
|
|
470
|
+
type: "MethodDefinition";
|
|
471
|
+
value: _babel_types.FunctionExpression;
|
|
472
|
+
variance?: _babel_types.Variance | null;
|
|
473
|
+
}
|
|
474
|
+
interface EstreePrivateIdentifier extends BaseNode {
|
|
475
|
+
type: "PrivateIdentifier";
|
|
476
|
+
name: string;
|
|
477
|
+
}
|
|
478
|
+
interface EstreePropertyDefinitionBase extends BaseNode {
|
|
479
|
+
static: boolean;
|
|
480
|
+
key: _babel_types.Expression | EstreePrivateIdentifier;
|
|
481
|
+
computed: boolean;
|
|
482
|
+
accessibility?: Accessibility;
|
|
483
|
+
override?: boolean;
|
|
484
|
+
optional?: boolean;
|
|
485
|
+
declare?: boolean;
|
|
486
|
+
decorators?: _babel_types.Decorator[];
|
|
487
|
+
definite?: boolean;
|
|
488
|
+
readonly?: boolean;
|
|
489
|
+
typeAnnotation?: _babel_types.TSTypeAnnotation | null;
|
|
490
|
+
}
|
|
491
|
+
interface EstreePropertyDefinition extends EstreePropertyDefinitionBase {
|
|
492
|
+
type: "PropertyDefinition";
|
|
493
|
+
value: _babel_types.Expression;
|
|
494
|
+
}
|
|
495
|
+
interface EstreeAccessorProperty extends EstreePropertyDefinitionBase {
|
|
496
|
+
type: "AccessorProperty";
|
|
497
|
+
value: _babel_types.Expression;
|
|
498
|
+
}
|
|
499
|
+
interface EstreeChainExpression extends BaseNode {
|
|
500
|
+
type: "ChainExpression";
|
|
501
|
+
expression: _babel_types.Expression;
|
|
502
|
+
}
|
|
503
|
+
interface DeclarationBase extends BaseNode {
|
|
504
|
+
declare?: boolean;
|
|
505
|
+
}
|
|
506
|
+
interface HasDecorators extends BaseNode {
|
|
507
|
+
decorators?: _babel_types.Decorator[];
|
|
508
|
+
}
|
|
509
|
+
interface TypeParameterDeclarationBase extends BaseNode {
|
|
510
|
+
params: (_babel_types.TypeParameter | _babel_types.TSTypeParameter)[];
|
|
511
|
+
}
|
|
512
|
+
interface TypeAnnotationBase extends BaseNode {
|
|
513
|
+
typeAnnotation: _babel_types.Node;
|
|
514
|
+
}
|
|
515
|
+
interface BodilessFunctionOrMethodBase extends HasDecorators {
|
|
516
|
+
id: _babel_types.Identifier | undefined | null;
|
|
517
|
+
params: (_babel_types.Pattern | _babel_types.TSParameterProperty)[];
|
|
518
|
+
generator: boolean;
|
|
519
|
+
async: boolean;
|
|
520
|
+
expression: boolean;
|
|
521
|
+
typeParameters?: TypeParameterDeclarationBase | null;
|
|
522
|
+
returnType?: TypeAnnotationBase | null;
|
|
523
|
+
}
|
|
524
|
+
interface EstreeTSEmptyBodyFunctionExpression extends BodilessFunctionOrMethodBase, DeclarationBase {
|
|
525
|
+
type: "TSEmptyBodyFunctionExpression";
|
|
526
|
+
body: null;
|
|
527
|
+
}
|
|
528
|
+
interface EstreeTSAbstractMethodDefinition extends EstreeMethodDefinitionBase {
|
|
529
|
+
type: "TSAbstractMethodDefinition";
|
|
530
|
+
value: EstreeTSEmptyBodyFunctionExpression;
|
|
531
|
+
}
|
|
532
|
+
interface EstreeTSAbstractPropertyDefinition extends EstreePropertyDefinitionBase {
|
|
533
|
+
type: "TSAbstractPropertyDefinition";
|
|
534
|
+
value: null;
|
|
535
|
+
}
|
|
536
|
+
interface EstreeTSAbstractAccessorProperty extends EstreePropertyDefinitionBase {
|
|
537
|
+
type: "TSAbstractAccessorProperty";
|
|
538
|
+
value: null;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
type Plugin$1 =
|
|
542
|
+
| "asyncDoExpressions"
|
|
543
|
+
| "decorators"
|
|
544
|
+
| "decorators-legacy"
|
|
545
|
+
| "decoratorAutoAccessors"
|
|
546
|
+
| "deferredImportEvaluation"
|
|
547
|
+
| "deferredReexports"
|
|
548
|
+
| "destructuringPrivate"
|
|
549
|
+
| "doExpressions"
|
|
550
|
+
| "exportDefaultFrom"
|
|
551
|
+
| "flow"
|
|
552
|
+
| "flowComments"
|
|
553
|
+
| "functionBind"
|
|
554
|
+
| "functionSent"
|
|
555
|
+
| "importSync"
|
|
556
|
+
| "jsx"
|
|
557
|
+
| "moduleBlocks"
|
|
558
|
+
| "namespaceImportFilter"
|
|
559
|
+
| "placeholders"
|
|
560
|
+
| "sourcePhaseImports"
|
|
561
|
+
| "structs"
|
|
562
|
+
| "throwExpressions"
|
|
563
|
+
| "v8intrinsic"
|
|
564
|
+
| ParserPluginWithOptions[0];
|
|
565
|
+
|
|
566
|
+
type ParserPluginWithOptions =
|
|
567
|
+
| ["discardBinding", { syntaxType: "void" }]
|
|
568
|
+
| ["estree", { classFeatures?: boolean }]
|
|
569
|
+
| ["optionalChainingAssign", { version: "2023-07" }]
|
|
570
|
+
| ["partialApplication", PartialApplicationPluginOptions]
|
|
571
|
+
| ["pipelineOperator", PipelineOperatorPluginOptions]
|
|
572
|
+
| ["flow", FlowPluginOptions]
|
|
573
|
+
| ["typescript", TypeScriptPluginOptions];
|
|
574
|
+
|
|
575
|
+
type PluginConfig = Plugin$1 | ParserPluginWithOptions;
|
|
576
|
+
|
|
577
|
+
interface PartialApplicationPluginOptions {
|
|
578
|
+
version: "2018-07";
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
interface PipelineOperatorPluginOptions {
|
|
582
|
+
proposal: "fsharp" | "hack";
|
|
583
|
+
topicToken?: "%" | "#" | "@@" | "^^" | "^";
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
interface FlowPluginOptions {
|
|
587
|
+
all?: boolean;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
interface TypeScriptPluginOptions {
|
|
591
|
+
dts?: boolean;
|
|
592
|
+
disallowAmbiguousJSXLike?: boolean;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* A whitespace token containing comments
|
|
597
|
+
*/
|
|
598
|
+
type CommentWhitespace = {
|
|
599
|
+
/**
|
|
600
|
+
* the start of the whitespace token.
|
|
601
|
+
*/
|
|
602
|
+
start: number;
|
|
603
|
+
/**
|
|
604
|
+
* the end of the whitespace token.
|
|
605
|
+
*/
|
|
606
|
+
end: number;
|
|
607
|
+
/**
|
|
608
|
+
* the containing comments
|
|
609
|
+
*/
|
|
610
|
+
comments: Comment[];
|
|
611
|
+
/**
|
|
612
|
+
* the immediately preceding AST node of the whitespace token
|
|
613
|
+
*/
|
|
614
|
+
leadingNode: Node | null;
|
|
615
|
+
/**
|
|
616
|
+
* the immediately following AST node of the whitespace token
|
|
617
|
+
*/
|
|
618
|
+
trailingNode: Node | null;
|
|
619
|
+
/**
|
|
620
|
+
* the innermost AST node containing the whitespace with minimal size (|end - start|)
|
|
621
|
+
*/
|
|
622
|
+
containingNode: Node | null;
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
declare class Token {
|
|
626
|
+
constructor(state: State);
|
|
627
|
+
type: TokenType;
|
|
628
|
+
value: any;
|
|
629
|
+
start: number;
|
|
630
|
+
end: number;
|
|
631
|
+
loc: SourceLocation;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
declare const JsxErrorTemplates: {
|
|
635
|
+
AttributeIsEmpty: string;
|
|
636
|
+
MissingClosingTagElement: ({ openingTagName }: {
|
|
637
|
+
openingTagName: string;
|
|
638
|
+
}) => string;
|
|
639
|
+
MissingClosingTagFragment: string;
|
|
640
|
+
UnexpectedSequenceExpression: string;
|
|
641
|
+
UnexpectedToken: ({ unexpected, HTMLEntity, }: {
|
|
642
|
+
unexpected: string;
|
|
643
|
+
HTMLEntity: string;
|
|
644
|
+
}) => string;
|
|
645
|
+
UnsupportedJsxValue: string;
|
|
646
|
+
UnterminatedJsxContent: string;
|
|
647
|
+
UnwrappedAdjacentJSXElements: string;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
type TsModifier = "readonly" | "abstract" | "declare" | "static" | "override" | "const" | Accessibility | VarianceAnnotations;
|
|
651
|
+
declare const TSErrorTemplates: {
|
|
652
|
+
AbstractMethodHasImplementation: ({ methodName }: {
|
|
653
|
+
methodName: string;
|
|
654
|
+
}) => string;
|
|
655
|
+
AbstractPropertyHasInitializer: ({ propertyName, }: {
|
|
656
|
+
propertyName: string;
|
|
657
|
+
}) => string;
|
|
658
|
+
AccessorCannotBeOptional: string;
|
|
659
|
+
AccessorCannotDeclareThisParameter: string;
|
|
660
|
+
AccessorCannotHaveTypeParameters: string;
|
|
661
|
+
ClassMethodHasDeclare: string;
|
|
662
|
+
ClassMethodHasReadonly: string;
|
|
663
|
+
ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: string;
|
|
664
|
+
ConstructorHasTypeParameters: string;
|
|
665
|
+
DeclaratorDefiniteAssertionRequiresTypeAnnotation: string;
|
|
666
|
+
DeclaratorDefiniteAssertionWithInitializer: string;
|
|
667
|
+
DeclareAccessor: ({ kind }: {
|
|
668
|
+
kind: "get" | "set";
|
|
669
|
+
}) => string;
|
|
670
|
+
DeclareClassFieldHasInitializer: string;
|
|
671
|
+
DeclareFunctionHasImplementation: string;
|
|
672
|
+
DecoratorAbstractMethod: ({ kind, }: {
|
|
673
|
+
kind: "abstract method" | "abstract field" | "declare field";
|
|
674
|
+
}) => string;
|
|
675
|
+
DuplicateAccessibilityModifier: ({ modifier, }: {
|
|
676
|
+
modifier: Accessibility;
|
|
677
|
+
}) => string;
|
|
678
|
+
DuplicateModifier: ({ modifier }: {
|
|
679
|
+
modifier: TsModifier;
|
|
680
|
+
}) => string;
|
|
681
|
+
EmptyHeritageClauseType: ({ token }: {
|
|
682
|
+
token: "extends" | "implements";
|
|
683
|
+
}) => string;
|
|
684
|
+
EmptyNamespaceName: string;
|
|
685
|
+
EmptyTypeArguments: string;
|
|
686
|
+
EmptyTypeParameters: string;
|
|
687
|
+
ExpectedAmbientAfterExportDeclare: string;
|
|
688
|
+
ExportAssignmentInTSNamespace: string;
|
|
689
|
+
ExportInTSNamespace: string;
|
|
690
|
+
ImportAliasHasImportType: string;
|
|
691
|
+
ImportInTSNamespace: string;
|
|
692
|
+
IncompatibleModifiers: ({ modifiers, }: {
|
|
693
|
+
modifiers: [TsModifier, TsModifier];
|
|
694
|
+
}) => string;
|
|
695
|
+
IndexSignatureHasAbstract: string;
|
|
696
|
+
IndexSignatureHasAccessibility: ({ modifier, }: {
|
|
697
|
+
modifier: Accessibility;
|
|
698
|
+
}) => string;
|
|
699
|
+
IndexSignatureHasDeclare: string;
|
|
700
|
+
IndexSignatureHasOverride: string;
|
|
701
|
+
IndexSignatureHasStatic: string;
|
|
702
|
+
InitializerNotAllowedInAmbientContext: string;
|
|
703
|
+
InlineModuleDeclarationMustUseString: string;
|
|
704
|
+
InvalidHeritageClauseType: ({ token }: {
|
|
705
|
+
token: "extends" | "implements";
|
|
706
|
+
}) => string;
|
|
707
|
+
InvalidModifierOnAwaitUsingDeclaration: (modifier: TsModifier) => string;
|
|
708
|
+
InvalidModifierOnTypeMember: ({ modifier }: {
|
|
709
|
+
modifier: TsModifier;
|
|
710
|
+
}) => string;
|
|
711
|
+
InvalidModifierOnTypeParameter: ({ modifier }: {
|
|
712
|
+
modifier: TsModifier;
|
|
713
|
+
}) => string;
|
|
714
|
+
InvalidModifierOnTypeParameterPositions: ({ modifier, }: {
|
|
715
|
+
modifier: TsModifier;
|
|
716
|
+
}) => string;
|
|
717
|
+
InvalidModifierOnUsingDeclaration: (modifier: TsModifier) => string;
|
|
718
|
+
InvalidModifiersOrder: ({ orderedModifiers, }: {
|
|
719
|
+
orderedModifiers: [TsModifier, TsModifier];
|
|
720
|
+
}) => string;
|
|
721
|
+
InvalidNamespaceName: (value: string | number) => string;
|
|
722
|
+
InvalidPropertyAccessAfterInstantiationExpression: string;
|
|
723
|
+
InvalidTupleMemberLabel: string;
|
|
724
|
+
MissingInterfaceName: string;
|
|
725
|
+
NamespaceExportInTSNamespace: string;
|
|
726
|
+
NonAbstractClassHasAbstractMethod: string;
|
|
727
|
+
NonClassMethodPropertyHasAbstractModifier: string;
|
|
728
|
+
OptionalTypeBeforeRequired: string;
|
|
729
|
+
OverrideNotInSubClass: string;
|
|
730
|
+
PatternIsOptional: string;
|
|
731
|
+
PrivateElementHasAbstract: string;
|
|
732
|
+
PrivateElementHasAccessibility: ({ modifier, }: {
|
|
733
|
+
modifier: Accessibility;
|
|
734
|
+
}) => string;
|
|
735
|
+
ReadonlyForMethodSignature: string;
|
|
736
|
+
ReservedArrowTypeParam: string;
|
|
737
|
+
ReservedTypeAssertion: string;
|
|
738
|
+
SetAccessorCannotHaveOptionalParameter: string;
|
|
739
|
+
SetAccessorCannotHaveRestParameter: string;
|
|
740
|
+
SetAccessorCannotHaveReturnType: string;
|
|
741
|
+
SingleTypeParameterWithoutTrailingComma: ({ typeParameterName, }: {
|
|
742
|
+
typeParameterName: string;
|
|
743
|
+
}) => string;
|
|
744
|
+
StaticBlockCannotHaveModifier: string;
|
|
745
|
+
TupleOptionalAfterType: string;
|
|
746
|
+
TypeAnnotationAfterAssign: string;
|
|
747
|
+
TypeImportCannotSpecifyDefaultAndNamed: string;
|
|
748
|
+
TypeModifierIsUsedInTypeExports: string;
|
|
749
|
+
TypeModifierIsUsedInTypeImports: string;
|
|
750
|
+
UnexpectedParameterInitializer: string;
|
|
751
|
+
UnexpectedParameterModifier: string;
|
|
752
|
+
UnexpectedReadonly: string;
|
|
753
|
+
UnexpectedTypeAnnotation: string;
|
|
754
|
+
UnexpectedTypeCastInParameter: string;
|
|
755
|
+
UnexpectedTypeDeclaration: (type: "interface" | "type") => string;
|
|
756
|
+
UnsupportedImportTypeArgument: string;
|
|
757
|
+
UnsupportedParameterPropertyKind: string;
|
|
758
|
+
UnsupportedSignatureParameterKind: ({ type }: {
|
|
759
|
+
type: string;
|
|
760
|
+
}) => string;
|
|
761
|
+
UsingDeclarationInAmbientContext: (kind: "using" | "await using") => string;
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
declare const FlowErrorTemplates: {
|
|
765
|
+
AmbiguousConditionalArrow: string;
|
|
766
|
+
AmbiguousDeclareModuleKind: string;
|
|
767
|
+
AssignReservedType: ({ reservedType }: {
|
|
768
|
+
reservedType: string;
|
|
769
|
+
}) => string;
|
|
770
|
+
DeclareClassElement: string;
|
|
771
|
+
DeclareClassFieldInitializer: string;
|
|
772
|
+
DuplicateDeclareModuleExports: string;
|
|
773
|
+
EnumBooleanMemberNotInitialized: ({ memberName, enumName, }: {
|
|
774
|
+
memberName: string;
|
|
775
|
+
enumName: string;
|
|
776
|
+
}) => string;
|
|
777
|
+
EnumDuplicateMemberName: ({ memberName, enumName, }: {
|
|
778
|
+
memberName: string;
|
|
779
|
+
enumName: string;
|
|
780
|
+
}) => string;
|
|
781
|
+
EnumInconsistentMemberValues: ({ enumName }: {
|
|
782
|
+
enumName: string;
|
|
783
|
+
}) => string;
|
|
784
|
+
EnumInvalidExplicitType: ({ invalidEnumType, enumName, }: {
|
|
785
|
+
invalidEnumType: string;
|
|
786
|
+
enumName: string;
|
|
787
|
+
}) => string;
|
|
788
|
+
EnumInvalidExplicitTypeUnknownSupplied: ({ enumName, }: {
|
|
789
|
+
enumName: string;
|
|
790
|
+
}) => string;
|
|
791
|
+
EnumInvalidMemberInitializerPrimaryType: ({ enumName, memberName, explicitType, }: {
|
|
792
|
+
enumName: string;
|
|
793
|
+
memberName: string;
|
|
794
|
+
explicitType: EnumExplicitType;
|
|
795
|
+
}) => string;
|
|
796
|
+
EnumInvalidMemberInitializerSymbolType: ({ enumName, memberName, }: {
|
|
797
|
+
enumName: string;
|
|
798
|
+
memberName: string;
|
|
799
|
+
explicitType: EnumExplicitType;
|
|
800
|
+
}) => string;
|
|
801
|
+
EnumInvalidMemberInitializerUnknownType: ({ enumName, memberName, }: {
|
|
802
|
+
enumName: string;
|
|
803
|
+
memberName: string;
|
|
804
|
+
explicitType: EnumExplicitType;
|
|
805
|
+
}) => string;
|
|
806
|
+
EnumInvalidMemberName: ({ enumName, memberName, suggestion, }: {
|
|
807
|
+
enumName: string;
|
|
808
|
+
memberName: string;
|
|
809
|
+
suggestion: string;
|
|
810
|
+
}) => string;
|
|
811
|
+
EnumNumberMemberNotInitialized: ({ enumName, memberName, }: {
|
|
812
|
+
enumName: string;
|
|
813
|
+
memberName: string;
|
|
814
|
+
}) => string;
|
|
815
|
+
EnumStringMemberInconsistentlyInitialized: ({ enumName, }: {
|
|
816
|
+
enumName: string;
|
|
817
|
+
}) => string;
|
|
818
|
+
GetterMayNotHaveThisParam: string;
|
|
819
|
+
ImportTypeShorthandOnlyInPureImport: string;
|
|
820
|
+
InexactInsideExact: string;
|
|
821
|
+
InexactInsideNonObject: string;
|
|
822
|
+
InexactVariance: string;
|
|
823
|
+
InvalidNonTypeImportInDeclareModule: string;
|
|
824
|
+
MissingTypeParamDefault: string;
|
|
825
|
+
NestedDeclareModule: string;
|
|
826
|
+
NestedFlowComment: string;
|
|
827
|
+
PatternIsOptional: {
|
|
828
|
+
message: string;
|
|
829
|
+
};
|
|
830
|
+
SetterMayNotHaveThisParam: string;
|
|
831
|
+
SpreadVariance: string;
|
|
832
|
+
ThisParamAnnotationRequired: string;
|
|
833
|
+
ThisParamBannedInConstructor: string;
|
|
834
|
+
ThisParamMayNotBeOptional: string;
|
|
835
|
+
ThisParamMustBeFirst: string;
|
|
836
|
+
ThisParamNoDefault: string;
|
|
837
|
+
TypeBeforeInitializer: string;
|
|
838
|
+
TypeCastInPattern: string;
|
|
839
|
+
UnexpectedExplicitInexactInObject: string;
|
|
840
|
+
UnexpectedReservedType: ({ reservedType }: {
|
|
841
|
+
reservedType: string;
|
|
842
|
+
}) => string;
|
|
843
|
+
UnexpectedReservedUnderscore: string;
|
|
844
|
+
UnexpectedSpaceBetweenModuloChecks: string;
|
|
845
|
+
UnexpectedSpreadType: string;
|
|
846
|
+
UnexpectedSubtractionOperand: string;
|
|
847
|
+
UnexpectedTokenAfterTypeParameter: string;
|
|
848
|
+
UnexpectedTypeParameterBeforeAsyncArrowFunction: string;
|
|
849
|
+
UnsupportedDeclareExportKind: ({ unsupportedExportKind, suggestion, }: {
|
|
850
|
+
unsupportedExportKind: string;
|
|
851
|
+
suggestion: string;
|
|
852
|
+
}) => string;
|
|
853
|
+
UnsupportedStatementInDeclareModule: string;
|
|
854
|
+
UnterminatedFlowComment: string;
|
|
855
|
+
};
|
|
856
|
+
type EnumExplicitType = null | "boolean" | "number" | "string" | "symbol";
|
|
857
|
+
|
|
858
|
+
type ParseError = SyntaxError & {
|
|
859
|
+
missingPlugin?: string | string[];
|
|
860
|
+
loc: Position;
|
|
861
|
+
pos: number;
|
|
862
|
+
} & ErrorInfo;
|
|
863
|
+
type ParseErrorConstructor<ErrorDetails> = (loc: Position, pos: number, details: ErrorDetails) => ParseError;
|
|
864
|
+
type ToMessage<ErrorDetails> = (self: ErrorDetails) => string;
|
|
865
|
+
type ErrorToObject<T> = {
|
|
866
|
+
[K in keyof T]: {
|
|
867
|
+
code: T[K] extends {
|
|
868
|
+
code: string;
|
|
869
|
+
} ? T[K]["code"] : "BABEL_PARSER_SYNTAX_ERROR";
|
|
870
|
+
reasonCode: K;
|
|
871
|
+
details: T[K] extends {
|
|
872
|
+
message: string | ToMessage<any>;
|
|
873
|
+
} ? T[K]["message"] extends ToMessage<any> ? Parameters<T[K]["message"]>[0] : object : T[K] extends ToMessage<any> ? Parameters<T[K]>[0] : object;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
type __ExtractMe = typeof _default$4 & typeof _default$3 & typeof _default$2 & typeof _default$1 & typeof _default & typeof _default$5 & typeof TSErrorTemplates & typeof FlowErrorTemplates & typeof JsxErrorTemplates & typeof PlaceholderErrorTemplates;
|
|
877
|
+
type __PatchMe = never & Decompress<ErrorInfoCompressed>;
|
|
878
|
+
type ErrorsObjects = ErrorToObject<__ExtractMe>;
|
|
879
|
+
type ErrorInfo = __PatchMe | ErrorsObjects[keyof ErrorsObjects];
|
|
880
|
+
type ErrorInfoCompressed = {};
|
|
881
|
+
type Decompress<T extends object> = {
|
|
882
|
+
[K in keyof T]: T[K] extends [infer Param, infer Code] ? {
|
|
883
|
+
code: Code;
|
|
884
|
+
reasonCode: K;
|
|
885
|
+
details: Param;
|
|
886
|
+
} : T[K] extends [infer Param] ? {
|
|
887
|
+
code: "BABEL_PARSER_SYNTAX_ERROR";
|
|
888
|
+
reasonCode: K;
|
|
889
|
+
details: Param;
|
|
890
|
+
} : T[K] extends [] ? {
|
|
891
|
+
code: "BABEL_PARSER_SYNTAX_ERROR";
|
|
892
|
+
reasonCode: K;
|
|
893
|
+
details: object;
|
|
894
|
+
} : never;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
declare const PlaceholderErrorTemplates: {
|
|
898
|
+
ClassNameIsRequired: string;
|
|
899
|
+
UnexpectedSpace: string;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
type Plugin = PluginConfig;
|
|
903
|
+
|
|
904
|
+
type SourceType = "script" | "commonjs" | "module" | "unambiguous";
|
|
905
|
+
interface Options {
|
|
906
|
+
/**
|
|
907
|
+
* By default, import and export declarations can only appear at a program's top level.
|
|
908
|
+
* Setting this option to true allows them anywhere where a statement is allowed.
|
|
909
|
+
*/
|
|
910
|
+
allowImportExportEverywhere?: boolean;
|
|
911
|
+
/**
|
|
912
|
+
* By default, await use is not allowed outside of an async function.
|
|
913
|
+
* Set this to true to accept such code.
|
|
914
|
+
*/
|
|
915
|
+
allowAwaitOutsideFunction?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* By default, a return statement at the top level raises an error.
|
|
918
|
+
* Set this to true to accept such code.
|
|
919
|
+
*/
|
|
920
|
+
allowReturnOutsideFunction?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* By default, new.target use is not allowed outside of a function or class.
|
|
923
|
+
* Set this to true to accept such code.
|
|
924
|
+
*/
|
|
925
|
+
allowNewTargetOutsideFunction?: boolean;
|
|
926
|
+
/**
|
|
927
|
+
* By default, super calls are not allowed outside of a method.
|
|
928
|
+
* Set this to true to accept such code.
|
|
929
|
+
*/
|
|
930
|
+
allowSuperOutsideMethod?: boolean;
|
|
931
|
+
/**
|
|
932
|
+
* By default, exported identifiers must refer to a declared variable.
|
|
933
|
+
* Set this to true to allow export statements to reference undeclared variables.
|
|
934
|
+
*/
|
|
935
|
+
allowUndeclaredExports?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* By default, yield use is not allowed outside of a generator function.
|
|
938
|
+
* Set this to true to accept such code.
|
|
939
|
+
*/
|
|
940
|
+
allowYieldOutsideFunction?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* By default, Babel parser JavaScript code according to Annex B syntax.
|
|
943
|
+
* Set this to `false` to disable such behavior.
|
|
944
|
+
*/
|
|
945
|
+
annexB?: boolean;
|
|
946
|
+
/**
|
|
947
|
+
* By default, Babel attaches comments to adjacent AST nodes.
|
|
948
|
+
* When this option is set to false, comments are not attached.
|
|
949
|
+
* It can provide up to 30% performance improvement when the input code has many comments.
|
|
950
|
+
* @babel/eslint-parser will set it for you.
|
|
951
|
+
* It is not recommended to use attachComment: false with Babel transform,
|
|
952
|
+
* as doing so removes all the comments in output code, and renders annotations such as
|
|
953
|
+
* /* istanbul ignore next *\/ nonfunctional.
|
|
954
|
+
*/
|
|
955
|
+
attachComment?: boolean;
|
|
956
|
+
/**
|
|
957
|
+
* By default, Babel always throws an error when it finds some invalid code.
|
|
958
|
+
* When this option is set to true, it will store the parsing error and
|
|
959
|
+
* try to continue parsing the invalid input file.
|
|
960
|
+
*/
|
|
961
|
+
errorRecovery?: boolean;
|
|
962
|
+
/**
|
|
963
|
+
* Indicate the mode the code should be parsed in.
|
|
964
|
+
* Can be one of "script", "commonjs", "module", or "unambiguous". Defaults to "script".
|
|
965
|
+
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
|
|
966
|
+
* of ES6 import or export statements.
|
|
967
|
+
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
|
|
968
|
+
*
|
|
969
|
+
* Use "commonjs" to parse code that is intended to be run in a CommonJS environment such as Node.js.
|
|
970
|
+
*/
|
|
971
|
+
sourceType?: SourceType;
|
|
972
|
+
/**
|
|
973
|
+
* Correlate output AST nodes with their source filename.
|
|
974
|
+
* Useful when generating code and source maps from the ASTs of multiple input files.
|
|
975
|
+
*/
|
|
976
|
+
sourceFilename?: string;
|
|
977
|
+
/**
|
|
978
|
+
* By default, all source indexes start from 0.
|
|
979
|
+
* You can provide a start index to alternatively start with.
|
|
980
|
+
* Useful for integration with other source tools.
|
|
981
|
+
*/
|
|
982
|
+
startIndex?: number;
|
|
983
|
+
/**
|
|
984
|
+
* By default, the first line of code parsed is treated as line 1.
|
|
985
|
+
* You can provide a line number to alternatively start with.
|
|
986
|
+
* Useful for integration with other source tools.
|
|
987
|
+
*/
|
|
988
|
+
startLine?: number;
|
|
989
|
+
/**
|
|
990
|
+
* By default, the parsed code is treated as if it starts from line 1, column 0.
|
|
991
|
+
* You can provide a column number to alternatively start with.
|
|
992
|
+
* Useful for integration with other source tools.
|
|
993
|
+
*/
|
|
994
|
+
startColumn?: number;
|
|
995
|
+
/**
|
|
996
|
+
* Array containing the plugins that you want to enable.
|
|
997
|
+
*/
|
|
998
|
+
plugins?: Plugin[];
|
|
999
|
+
/**
|
|
1000
|
+
* Should the parser work in strict mode.
|
|
1001
|
+
* Defaults to true if sourceType === 'module'. Otherwise, false.
|
|
1002
|
+
*/
|
|
1003
|
+
strictMode?: boolean;
|
|
1004
|
+
/**
|
|
1005
|
+
* Adds a ranges property to each node: [node.start, node.end]
|
|
1006
|
+
*/
|
|
1007
|
+
ranges?: boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
* Adds a locations property to each node: [node.loc]
|
|
1010
|
+
*/
|
|
1011
|
+
locations?: boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* Adds all parsed tokens to a tokens property on the File node.
|
|
1014
|
+
*/
|
|
1015
|
+
tokens?: boolean;
|
|
1016
|
+
/**
|
|
1017
|
+
* By default, the parser adds information about parentheses by setting
|
|
1018
|
+
* `extra.parenthesized` to `true` as needed.
|
|
1019
|
+
* When this option is `true` the parser creates `ParenthesizedExpression`
|
|
1020
|
+
* AST nodes instead of using the `extra` property.
|
|
1021
|
+
*/
|
|
1022
|
+
createParenthesizedExpressions?: boolean;
|
|
1023
|
+
/**
|
|
1024
|
+
* By default, the parser parses import expressions as an `ImportExpression` node.
|
|
1025
|
+
* Set this to false to parse it as `CallExpression(Import, [Identifier(foo)])`.
|
|
1026
|
+
*/
|
|
1027
|
+
createImportExpressions?: boolean;
|
|
1028
|
+
}
|
|
1029
|
+
type KeepOptionalKeys = "sourceFilename" | "strictMode";
|
|
1030
|
+
type OptionsWithDefaults = Omit<Required<Options>, KeepOptionalKeys> & Pick<Options, KeepOptionalKeys>;
|
|
1031
|
+
|
|
1032
|
+
type ParserOptions = Partial<Options>;
|
|
1033
|
+
type ParseResult<Result extends File | Expression = File> = Result & {
|
|
1034
|
+
comments: File["comments"];
|
|
1035
|
+
errors: ParseError[];
|
|
1036
|
+
tokens?: File["tokens"];
|
|
1037
|
+
};
|
|
1038
|
+
/**
|
|
1039
|
+
* Parse the provided code as an entire ECMAScript program.
|
|
1040
|
+
*/
|
|
1041
|
+
declare function parse(input: string, options?: ParserOptions): ParseResult<File>;
|
|
1042
|
+
declare function parseExpression(input: string, options?: ParserOptions): ParseResult<Expression>;
|
|
1043
|
+
declare const tokTypes: Record<string, ExportedTokenType>;
|
|
1044
|
+
declare function getLine(locData: Uint32Array, pos: number): number;
|
|
1045
|
+
declare function getColumn(locData: Uint32Array, pos: number): number;
|
|
1046
|
+
|
|
1047
|
+
export { type FlowPluginOptions, type ParseError, type ParseResult, type ParserOptions, type PluginConfig as ParserPlugin, type PipelineOperatorPluginOptions, Token, type TypeScriptPluginOptions, getColumn, getLine, parse, parseExpression, tokTypes };
|