@babel/parser
Advanced tools
Comparing version 8.0.0-alpha.11 to 8.0.0-alpha.12
@@ -0,1 +1,5 @@ | ||
declare const UnparenthesizedPipeBodyDescriptions: Set<"ArrowFunctionExpression" | "AssignmentExpression" | "ConditionalExpression" | "YieldExpression">; | ||
type GetSetMemberType<T extends Set<any>> = T extends Set<infer M> ? M : unknown; | ||
type UnparenthesizedPipeBodyTypes = GetSetMemberType<typeof UnparenthesizedPipeBodyDescriptions>; | ||
declare class Position { | ||
@@ -15,35 +19,2 @@ line: number; | ||
declare class TokContext { | ||
constructor(token: string, preserveSpace?: boolean); | ||
token: string; | ||
preserveSpace: boolean; | ||
} | ||
type TokenOptions = { | ||
keyword?: string; | ||
beforeExpr?: boolean; | ||
startsExpr?: boolean; | ||
rightAssociative?: boolean; | ||
isLoop?: boolean; | ||
isAssign?: boolean; | ||
prefix?: boolean; | ||
postfix?: boolean; | ||
binop?: number | null; | ||
}; | ||
type TokenType = number; | ||
declare class ExportedTokenType { | ||
label: string; | ||
keyword: string | undefined | null; | ||
beforeExpr: boolean; | ||
startsExpr: boolean; | ||
rightAssociative: boolean; | ||
isLoop: boolean; | ||
isAssign: boolean; | ||
prefix: boolean; | ||
postfix: boolean; | ||
binop: number | undefined | null; | ||
updateContext: ((context: Array<TokContext>) => void) | undefined | null; | ||
constructor(label: string, conf?: TokenOptions); | ||
} | ||
type LValAncestor = { | ||
@@ -65,2 +36,3 @@ type: "UpdateExpression"; | ||
details: ErrorDetails; | ||
pos: number; | ||
} | ||
@@ -70,19 +42,19 @@ type ParseError<ErrorDetails> = SyntaxError & ParseErrorSpecification<ErrorDetails>; | ||
declare const Errors: { | ||
PipeBodyIsTighter: ParseErrorConstructor<{}>; | ||
PipeTopicRequiresHackPipes: ParseErrorConstructor<{}>; | ||
PipeTopicUnbound: ParseErrorConstructor<{}>; | ||
PipeBodyIsTighter: ParseErrorConstructor<object>; | ||
PipeTopicRequiresHackPipes: ParseErrorConstructor<object>; | ||
PipeTopicUnbound: ParseErrorConstructor<object>; | ||
PipeTopicUnconfiguredToken: ParseErrorConstructor<{ | ||
token: string; | ||
}>; | ||
PipeTopicUnused: ParseErrorConstructor<{}>; | ||
PipeTopicUnused: ParseErrorConstructor<object>; | ||
PipeUnparenthesizedBody: ParseErrorConstructor<{ | ||
type: "ArrowFunctionExpression" | "AssignmentExpression" | "ConditionalExpression" | "YieldExpression"; | ||
type: UnparenthesizedPipeBodyTypes; | ||
}>; | ||
PipelineBodyNoArrow: ParseErrorConstructor<{}>; | ||
PipelineBodySequenceExpression: ParseErrorConstructor<{}>; | ||
PipelineHeadSequenceExpression: ParseErrorConstructor<{}>; | ||
PipelineTopicUnused: ParseErrorConstructor<{}>; | ||
PrimaryTopicNotAllowed: ParseErrorConstructor<{}>; | ||
PrimaryTopicRequiresSmartPipeline: ParseErrorConstructor<{}>; | ||
StrictDelete: ParseErrorConstructor<{}>; | ||
PipelineBodyNoArrow: ParseErrorConstructor<object>; | ||
PipelineBodySequenceExpression: ParseErrorConstructor<object>; | ||
PipelineHeadSequenceExpression: ParseErrorConstructor<object>; | ||
PipelineTopicUnused: ParseErrorConstructor<object>; | ||
PrimaryTopicNotAllowed: ParseErrorConstructor<object>; | ||
PrimaryTopicRequiresSmartPipeline: ParseErrorConstructor<object>; | ||
StrictDelete: ParseErrorConstructor<object>; | ||
StrictEvalArguments: ParseErrorConstructor<{ | ||
@@ -94,50 +66,50 @@ referenceName: string; | ||
}>; | ||
StrictFunction: ParseErrorConstructor<{}>; | ||
StrictNumericEscape: ParseErrorConstructor<{}>; | ||
StrictOctalLiteral: ParseErrorConstructor<{}>; | ||
StrictWith: ParseErrorConstructor<{}>; | ||
StrictFunction: ParseErrorConstructor<object>; | ||
StrictNumericEscape: ParseErrorConstructor<object>; | ||
StrictOctalLiteral: ParseErrorConstructor<object>; | ||
StrictWith: ParseErrorConstructor<object>; | ||
AccessorIsGenerator: ParseErrorConstructor<{ | ||
kind: "get" | "set"; | ||
}>; | ||
ArgumentsInClass: ParseErrorConstructor<{}>; | ||
AsyncFunctionInSingleStatementContext: ParseErrorConstructor<{}>; | ||
AwaitBindingIdentifier: ParseErrorConstructor<{}>; | ||
AwaitBindingIdentifierInStaticBlock: ParseErrorConstructor<{}>; | ||
AwaitExpressionFormalParameter: ParseErrorConstructor<{}>; | ||
AwaitUsingNotInAsyncContext: ParseErrorConstructor<{}>; | ||
AwaitNotInAsyncContext: ParseErrorConstructor<{}>; | ||
AwaitNotInAsyncFunction: ParseErrorConstructor<{}>; | ||
BadGetterArity: ParseErrorConstructor<{}>; | ||
BadSetterArity: ParseErrorConstructor<{}>; | ||
BadSetterRestParameter: ParseErrorConstructor<{}>; | ||
ConstructorClassField: ParseErrorConstructor<{}>; | ||
ConstructorClassPrivateField: ParseErrorConstructor<{}>; | ||
ConstructorIsAccessor: ParseErrorConstructor<{}>; | ||
ConstructorIsAsync: ParseErrorConstructor<{}>; | ||
ConstructorIsGenerator: ParseErrorConstructor<{}>; | ||
ArgumentsInClass: ParseErrorConstructor<object>; | ||
AsyncFunctionInSingleStatementContext: ParseErrorConstructor<object>; | ||
AwaitBindingIdentifier: ParseErrorConstructor<object>; | ||
AwaitBindingIdentifierInStaticBlock: ParseErrorConstructor<object>; | ||
AwaitExpressionFormalParameter: ParseErrorConstructor<object>; | ||
AwaitUsingNotInAsyncContext: ParseErrorConstructor<object>; | ||
AwaitNotInAsyncContext: ParseErrorConstructor<object>; | ||
AwaitNotInAsyncFunction: ParseErrorConstructor<object>; | ||
BadGetterArity: ParseErrorConstructor<object>; | ||
BadSetterArity: ParseErrorConstructor<object>; | ||
BadSetterRestParameter: ParseErrorConstructor<object>; | ||
ConstructorClassField: ParseErrorConstructor<object>; | ||
ConstructorClassPrivateField: ParseErrorConstructor<object>; | ||
ConstructorIsAccessor: ParseErrorConstructor<object>; | ||
ConstructorIsAsync: ParseErrorConstructor<object>; | ||
ConstructorIsGenerator: ParseErrorConstructor<object>; | ||
DeclarationMissingInitializer: ParseErrorConstructor<{ | ||
kind: "const" | "using" | "await using" | "destructuring"; | ||
kind: "await using" | "const" | "destructuring" | "using"; | ||
}>; | ||
DecoratorArgumentsOutsideParentheses: ParseErrorConstructor<{}>; | ||
DecoratorBeforeExport: ParseErrorConstructor<{}>; | ||
DecoratorsBeforeAfterExport: ParseErrorConstructor<{}>; | ||
DecoratorConstructor: ParseErrorConstructor<{}>; | ||
DecoratorExportClass: ParseErrorConstructor<{}>; | ||
DecoratorSemicolon: ParseErrorConstructor<{}>; | ||
DecoratorStaticBlock: ParseErrorConstructor<{}>; | ||
DeferImportRequiresNamespace: ParseErrorConstructor<{}>; | ||
DeletePrivateField: ParseErrorConstructor<{}>; | ||
DestructureNamedImport: ParseErrorConstructor<{}>; | ||
DuplicateConstructor: ParseErrorConstructor<{}>; | ||
DuplicateDefaultExport: ParseErrorConstructor<{}>; | ||
DecoratorArgumentsOutsideParentheses: ParseErrorConstructor<object>; | ||
DecoratorBeforeExport: ParseErrorConstructor<object>; | ||
DecoratorsBeforeAfterExport: ParseErrorConstructor<object>; | ||
DecoratorConstructor: ParseErrorConstructor<object>; | ||
DecoratorExportClass: ParseErrorConstructor<object>; | ||
DecoratorSemicolon: ParseErrorConstructor<object>; | ||
DecoratorStaticBlock: ParseErrorConstructor<object>; | ||
DeferImportRequiresNamespace: ParseErrorConstructor<object>; | ||
DeletePrivateField: ParseErrorConstructor<object>; | ||
DestructureNamedImport: ParseErrorConstructor<object>; | ||
DuplicateConstructor: ParseErrorConstructor<object>; | ||
DuplicateDefaultExport: ParseErrorConstructor<object>; | ||
DuplicateExport: ParseErrorConstructor<{ | ||
exportName: string; | ||
}>; | ||
DuplicateProto: ParseErrorConstructor<{}>; | ||
DuplicateRegExpFlags: ParseErrorConstructor<{}>; | ||
DuplicateProto: ParseErrorConstructor<object>; | ||
DuplicateRegExpFlags: ParseErrorConstructor<object>; | ||
DynamicImportPhaseRequiresImportExpressions: ParseErrorConstructor<{ | ||
phase: string; | ||
}>; | ||
ElementAfterRest: ParseErrorConstructor<{}>; | ||
EscapedCharNotAnIdentifier: ParseErrorConstructor<{}>; | ||
ElementAfterRest: ParseErrorConstructor<object>; | ||
EscapedCharNotAnIdentifier: ParseErrorConstructor<object>; | ||
ExportBindingIsString: ParseErrorConstructor<{ | ||
@@ -147,38 +119,38 @@ localName: string; | ||
}>; | ||
ExportDefaultFromAsIdentifier: ParseErrorConstructor<{}>; | ||
ExportDefaultFromAsIdentifier: ParseErrorConstructor<object>; | ||
ForInOfLoopInitializer: ParseErrorConstructor<{ | ||
type: "ForInStatement" | "ForOfStatement"; | ||
}>; | ||
ForInUsing: ParseErrorConstructor<{}>; | ||
ForOfAsync: ParseErrorConstructor<{}>; | ||
ForOfLet: ParseErrorConstructor<{}>; | ||
GeneratorInSingleStatementContext: ParseErrorConstructor<{}>; | ||
ForInUsing: ParseErrorConstructor<object>; | ||
ForOfAsync: ParseErrorConstructor<object>; | ||
ForOfLet: ParseErrorConstructor<object>; | ||
GeneratorInSingleStatementContext: ParseErrorConstructor<object>; | ||
IllegalBreakContinue: ParseErrorConstructor<{ | ||
type: "BreakStatement" | "ContinueStatement"; | ||
}>; | ||
IllegalLanguageModeDirective: ParseErrorConstructor<{}>; | ||
IllegalReturn: ParseErrorConstructor<{}>; | ||
ImportAttributesUseAssert: ParseErrorConstructor<{}>; | ||
IllegalLanguageModeDirective: ParseErrorConstructor<object>; | ||
IllegalReturn: ParseErrorConstructor<object>; | ||
ImportAttributesUseAssert: ParseErrorConstructor<object>; | ||
ImportBindingIsString: ParseErrorConstructor<{ | ||
importName: string; | ||
}>; | ||
ImportCallArgumentTrailingComma: ParseErrorConstructor<{}>; | ||
ImportCallArgumentTrailingComma: ParseErrorConstructor<object>; | ||
ImportCallArity: ParseErrorConstructor<{ | ||
maxArgumentCount: 2 | 1; | ||
maxArgumentCount: 1 | 2; | ||
}>; | ||
ImportCallNotNewExpression: ParseErrorConstructor<{}>; | ||
ImportCallSpreadArgument: ParseErrorConstructor<{}>; | ||
ImportJSONBindingNotDefault: ParseErrorConstructor<{}>; | ||
ImportReflectionHasAssertion: ParseErrorConstructor<{}>; | ||
ImportReflectionNotBinding: ParseErrorConstructor<{}>; | ||
IncompatibleRegExpUVFlags: ParseErrorConstructor<{}>; | ||
InvalidBigIntLiteral: ParseErrorConstructor<{}>; | ||
InvalidCodePoint: ParseErrorConstructor<{}>; | ||
InvalidCoverInitializedName: ParseErrorConstructor<{}>; | ||
InvalidDecimal: ParseErrorConstructor<{}>; | ||
ImportCallNotNewExpression: ParseErrorConstructor<object>; | ||
ImportCallSpreadArgument: ParseErrorConstructor<object>; | ||
ImportJSONBindingNotDefault: ParseErrorConstructor<object>; | ||
ImportReflectionHasAssertion: ParseErrorConstructor<object>; | ||
ImportReflectionNotBinding: ParseErrorConstructor<object>; | ||
IncompatibleRegExpUVFlags: ParseErrorConstructor<object>; | ||
InvalidBigIntLiteral: ParseErrorConstructor<object>; | ||
InvalidCodePoint: ParseErrorConstructor<object>; | ||
InvalidCoverInitializedName: ParseErrorConstructor<object>; | ||
InvalidDecimal: ParseErrorConstructor<object>; | ||
InvalidDigit: ParseErrorConstructor<{ | ||
radix: number; | ||
}>; | ||
InvalidEscapeSequence: ParseErrorConstructor<{}>; | ||
InvalidEscapeSequenceTemplate: ParseErrorConstructor<{}>; | ||
InvalidEscapeSequence: ParseErrorConstructor<object>; | ||
InvalidEscapeSequenceTemplate: ParseErrorConstructor<object>; | ||
InvalidEscapedReservedWord: ParseErrorConstructor<{ | ||
@@ -199,23 +171,23 @@ reservedWord: string; | ||
}>; | ||
InvalidNumber: ParseErrorConstructor<{}>; | ||
InvalidOrMissingExponent: ParseErrorConstructor<{}>; | ||
InvalidNumber: ParseErrorConstructor<object>; | ||
InvalidOrMissingExponent: ParseErrorConstructor<object>; | ||
InvalidOrUnexpectedToken: ParseErrorConstructor<{ | ||
unexpected: string; | ||
}>; | ||
InvalidParenthesizedAssignment: ParseErrorConstructor<{}>; | ||
InvalidParenthesizedAssignment: ParseErrorConstructor<object>; | ||
InvalidPrivateFieldResolution: ParseErrorConstructor<{ | ||
identifierName: string; | ||
}>; | ||
InvalidPropertyBindingPattern: ParseErrorConstructor<{}>; | ||
InvalidRecordProperty: ParseErrorConstructor<{}>; | ||
InvalidRestAssignmentPattern: ParseErrorConstructor<{}>; | ||
InvalidPropertyBindingPattern: ParseErrorConstructor<object>; | ||
InvalidRecordProperty: ParseErrorConstructor<object>; | ||
InvalidRestAssignmentPattern: ParseErrorConstructor<object>; | ||
LabelRedeclaration: ParseErrorConstructor<{ | ||
labelName: string; | ||
}>; | ||
LetInLexicalBinding: ParseErrorConstructor<{}>; | ||
LineTerminatorBeforeArrow: ParseErrorConstructor<{}>; | ||
MalformedRegExpFlags: ParseErrorConstructor<{}>; | ||
MissingClassName: ParseErrorConstructor<{}>; | ||
MissingEqInAssignment: ParseErrorConstructor<{}>; | ||
MissingSemicolon: ParseErrorConstructor<{}>; | ||
LetInLexicalBinding: ParseErrorConstructor<object>; | ||
LineTerminatorBeforeArrow: ParseErrorConstructor<object>; | ||
MalformedRegExpFlags: ParseErrorConstructor<object>; | ||
MissingClassName: ParseErrorConstructor<object>; | ||
MissingEqInAssignment: ParseErrorConstructor<object>; | ||
MissingSemicolon: ParseErrorConstructor<object>; | ||
MissingPlugin: ParseErrorConstructor<{ | ||
@@ -227,6 +199,6 @@ missingPlugin: [string]; | ||
}>; | ||
MissingUnicodeEscape: ParseErrorConstructor<{}>; | ||
MixingCoalesceWithLogical: ParseErrorConstructor<{}>; | ||
ModuleAttributeDifferentFromType: ParseErrorConstructor<{}>; | ||
ModuleAttributeInvalidValue: ParseErrorConstructor<{}>; | ||
MissingUnicodeEscape: ParseErrorConstructor<object>; | ||
MixingCoalesceWithLogical: ParseErrorConstructor<object>; | ||
ModuleAttributeDifferentFromType: ParseErrorConstructor<object>; | ||
ModuleAttributeInvalidValue: ParseErrorConstructor<object>; | ||
ModuleAttributesWithDuplicateKeys: ParseErrorConstructor<{ | ||
@@ -241,14 +213,14 @@ key: string; | ||
}>; | ||
MultipleDefaultsInSwitch: ParseErrorConstructor<{}>; | ||
NewlineAfterThrow: ParseErrorConstructor<{}>; | ||
NoCatchOrFinally: ParseErrorConstructor<{}>; | ||
NumberIdentifier: ParseErrorConstructor<{}>; | ||
NumericSeparatorInEscapeSequence: ParseErrorConstructor<{}>; | ||
ObsoleteAwaitStar: ParseErrorConstructor<{}>; | ||
OptionalChainingNoNew: ParseErrorConstructor<{}>; | ||
OptionalChainingNoTemplate: ParseErrorConstructor<{}>; | ||
OverrideOnConstructor: ParseErrorConstructor<{}>; | ||
ParamDupe: ParseErrorConstructor<{}>; | ||
PatternHasAccessor: ParseErrorConstructor<{}>; | ||
PatternHasMethod: ParseErrorConstructor<{}>; | ||
MultipleDefaultsInSwitch: ParseErrorConstructor<object>; | ||
NewlineAfterThrow: ParseErrorConstructor<object>; | ||
NoCatchOrFinally: ParseErrorConstructor<object>; | ||
NumberIdentifier: ParseErrorConstructor<object>; | ||
NumericSeparatorInEscapeSequence: ParseErrorConstructor<object>; | ||
ObsoleteAwaitStar: ParseErrorConstructor<object>; | ||
OptionalChainingNoNew: ParseErrorConstructor<object>; | ||
OptionalChainingNoTemplate: ParseErrorConstructor<object>; | ||
OverrideOnConstructor: ParseErrorConstructor<object>; | ||
ParamDupe: ParseErrorConstructor<object>; | ||
PatternHasAccessor: ParseErrorConstructor<object>; | ||
PatternHasMethod: ParseErrorConstructor<object>; | ||
PrivateInExpectedIn: ParseErrorConstructor<{ | ||
@@ -260,43 +232,43 @@ identifierName: string; | ||
}>; | ||
RecordExpressionBarIncorrectEndSyntaxType: ParseErrorConstructor<{}>; | ||
RecordExpressionBarIncorrectStartSyntaxType: ParseErrorConstructor<{}>; | ||
RecordExpressionHashIncorrectStartSyntaxType: ParseErrorConstructor<{}>; | ||
RecordNoProto: ParseErrorConstructor<{}>; | ||
RestTrailingComma: ParseErrorConstructor<{}>; | ||
SloppyFunction: ParseErrorConstructor<{}>; | ||
SloppyFunctionAnnexB: ParseErrorConstructor<{}>; | ||
SourcePhaseImportRequiresDefault: ParseErrorConstructor<{}>; | ||
StaticPrototype: ParseErrorConstructor<{}>; | ||
SuperNotAllowed: ParseErrorConstructor<{}>; | ||
SuperPrivateField: ParseErrorConstructor<{}>; | ||
TrailingDecorator: ParseErrorConstructor<{}>; | ||
TupleExpressionBarIncorrectEndSyntaxType: ParseErrorConstructor<{}>; | ||
TupleExpressionBarIncorrectStartSyntaxType: ParseErrorConstructor<{}>; | ||
TupleExpressionHashIncorrectStartSyntaxType: ParseErrorConstructor<{}>; | ||
UnexpectedArgumentPlaceholder: ParseErrorConstructor<{}>; | ||
UnexpectedAwaitAfterPipelineBody: ParseErrorConstructor<{}>; | ||
UnexpectedDigitAfterHash: ParseErrorConstructor<{}>; | ||
UnexpectedImportExport: ParseErrorConstructor<{}>; | ||
RecordExpressionBarIncorrectEndSyntaxType: ParseErrorConstructor<object>; | ||
RecordExpressionBarIncorrectStartSyntaxType: ParseErrorConstructor<object>; | ||
RecordExpressionHashIncorrectStartSyntaxType: ParseErrorConstructor<object>; | ||
RecordNoProto: ParseErrorConstructor<object>; | ||
RestTrailingComma: ParseErrorConstructor<object>; | ||
SloppyFunction: ParseErrorConstructor<object>; | ||
SloppyFunctionAnnexB: ParseErrorConstructor<object>; | ||
SourcePhaseImportRequiresDefault: ParseErrorConstructor<object>; | ||
StaticPrototype: ParseErrorConstructor<object>; | ||
SuperNotAllowed: ParseErrorConstructor<object>; | ||
SuperPrivateField: ParseErrorConstructor<object>; | ||
TrailingDecorator: ParseErrorConstructor<object>; | ||
TupleExpressionBarIncorrectEndSyntaxType: ParseErrorConstructor<object>; | ||
TupleExpressionBarIncorrectStartSyntaxType: ParseErrorConstructor<object>; | ||
TupleExpressionHashIncorrectStartSyntaxType: ParseErrorConstructor<object>; | ||
UnexpectedArgumentPlaceholder: ParseErrorConstructor<object>; | ||
UnexpectedAwaitAfterPipelineBody: ParseErrorConstructor<object>; | ||
UnexpectedDigitAfterHash: ParseErrorConstructor<object>; | ||
UnexpectedImportExport: ParseErrorConstructor<object>; | ||
UnexpectedKeyword: ParseErrorConstructor<{ | ||
keyword: string; | ||
}>; | ||
UnexpectedLeadingDecorator: ParseErrorConstructor<{}>; | ||
UnexpectedLexicalDeclaration: ParseErrorConstructor<{}>; | ||
UnexpectedNewTarget: ParseErrorConstructor<{}>; | ||
UnexpectedNumericSeparator: ParseErrorConstructor<{}>; | ||
UnexpectedPrivateField: ParseErrorConstructor<{}>; | ||
UnexpectedLeadingDecorator: ParseErrorConstructor<object>; | ||
UnexpectedLexicalDeclaration: ParseErrorConstructor<object>; | ||
UnexpectedNewTarget: ParseErrorConstructor<object>; | ||
UnexpectedNumericSeparator: ParseErrorConstructor<object>; | ||
UnexpectedPrivateField: ParseErrorConstructor<object>; | ||
UnexpectedReservedWord: ParseErrorConstructor<{ | ||
reservedWord: string; | ||
}>; | ||
UnexpectedSuper: ParseErrorConstructor<{}>; | ||
UnexpectedSuper: ParseErrorConstructor<object>; | ||
UnexpectedToken: ParseErrorConstructor<{ | ||
expected?: string; | ||
unexpected?: string; | ||
expected?: string | null; | ||
unexpected?: string | null; | ||
}>; | ||
UnexpectedTokenUnaryExponentiation: ParseErrorConstructor<{}>; | ||
UnexpectedUsingDeclaration: ParseErrorConstructor<{}>; | ||
UnsupportedBind: ParseErrorConstructor<{}>; | ||
UnsupportedDecoratorExport: ParseErrorConstructor<{}>; | ||
UnsupportedDefaultExport: ParseErrorConstructor<{}>; | ||
UnsupportedImport: ParseErrorConstructor<{}>; | ||
UnexpectedTokenUnaryExponentiation: ParseErrorConstructor<object>; | ||
UnexpectedUsingDeclaration: ParseErrorConstructor<object>; | ||
UnsupportedBind: ParseErrorConstructor<object>; | ||
UnsupportedDecoratorExport: ParseErrorConstructor<object>; | ||
UnsupportedDefaultExport: ParseErrorConstructor<object>; | ||
UnsupportedImport: ParseErrorConstructor<object>; | ||
UnsupportedMetaProperty: ParseErrorConstructor<{ | ||
@@ -306,21 +278,54 @@ target: string; | ||
}>; | ||
UnsupportedParameterDecorator: ParseErrorConstructor<{}>; | ||
UnsupportedPropertyDecorator: ParseErrorConstructor<{}>; | ||
UnsupportedSuper: ParseErrorConstructor<{}>; | ||
UnterminatedComment: ParseErrorConstructor<{}>; | ||
UnterminatedRegExp: ParseErrorConstructor<{}>; | ||
UnterminatedString: ParseErrorConstructor<{}>; | ||
UnterminatedTemplate: ParseErrorConstructor<{}>; | ||
UsingDeclarationExport: ParseErrorConstructor<{}>; | ||
UsingDeclarationHasBindingPattern: ParseErrorConstructor<{}>; | ||
UnsupportedParameterDecorator: ParseErrorConstructor<object>; | ||
UnsupportedPropertyDecorator: ParseErrorConstructor<object>; | ||
UnsupportedSuper: ParseErrorConstructor<object>; | ||
UnterminatedComment: ParseErrorConstructor<object>; | ||
UnterminatedRegExp: ParseErrorConstructor<object>; | ||
UnterminatedString: ParseErrorConstructor<object>; | ||
UnterminatedTemplate: ParseErrorConstructor<object>; | ||
UsingDeclarationExport: ParseErrorConstructor<object>; | ||
UsingDeclarationHasBindingPattern: ParseErrorConstructor<object>; | ||
VarRedeclaration: ParseErrorConstructor<{ | ||
identifierName: string; | ||
}>; | ||
YieldBindingIdentifier: ParseErrorConstructor<{}>; | ||
YieldInParameter: ParseErrorConstructor<{}>; | ||
ZeroDigitNumericSeparator: ParseErrorConstructor<{}>; | ||
ImportMetaOutsideModule: ParseErrorConstructor<{}>; | ||
ImportOutsideModule: ParseErrorConstructor<{}>; | ||
YieldBindingIdentifier: ParseErrorConstructor<object>; | ||
YieldInParameter: ParseErrorConstructor<object>; | ||
ZeroDigitNumericSeparator: ParseErrorConstructor<object>; | ||
ImportMetaOutsideModule: ParseErrorConstructor<object>; | ||
ImportOutsideModule: ParseErrorConstructor<object>; | ||
}; | ||
declare class TokContext { | ||
constructor(token: string, preserveSpace?: boolean); | ||
token: string; | ||
preserveSpace: boolean; | ||
} | ||
type TokenOptions = { | ||
keyword?: string; | ||
beforeExpr?: boolean; | ||
startsExpr?: boolean; | ||
rightAssociative?: boolean; | ||
isLoop?: boolean; | ||
isAssign?: boolean; | ||
prefix?: boolean; | ||
postfix?: boolean; | ||
binop?: number | null; | ||
}; | ||
type TokenType = number; | ||
declare class ExportedTokenType { | ||
label: string; | ||
keyword: string | undefined | null; | ||
beforeExpr: boolean; | ||
startsExpr: boolean; | ||
rightAssociative: boolean; | ||
isLoop: boolean; | ||
isAssign: boolean; | ||
prefix: boolean; | ||
postfix: boolean; | ||
binop: number | undefined | null; | ||
updateContext: ((context: Array<TokContext>) => void) | undefined | null; | ||
constructor(label: string, conf?: TokenOptions); | ||
} | ||
type DeferredStrictError = typeof Errors.StrictNumericEscape | typeof Errors.StrictOctalLiteral; | ||
@@ -375,2 +380,3 @@ type TopicContextState = { | ||
firstInvalidTemplateEscapePos: null | Position; | ||
accessor hasTopLevelAwait: boolean; | ||
strictErrors: Map<number, [DeferredStrictError, Position]>; | ||
@@ -508,14 +514,2 @@ tokensLength: number; | ||
type PossiblePlaceholders = { | ||
Identifier: Identifier; | ||
StringLiteral: StringLiteral; | ||
Expression: Expression; | ||
Statement: Statement; | ||
Declaration: Declaration; | ||
BlockStatement: BlockStatement; | ||
ClassBody: ClassBody; | ||
Pattern: Pattern; | ||
}; | ||
type PlaceholderTypes = keyof PossiblePlaceholders; | ||
interface CommentBase { | ||
@@ -547,3 +541,3 @@ type: "CommentBlock" | "CommentLine"; | ||
} | ||
type NodeAny<T extends string, KnownProps = {}> = NodeBase & { | ||
type NodeAny<T extends string, KnownProps = object> = NodeBase & { | ||
type: T; | ||
@@ -1622,2 +1616,14 @@ [key: string]: any; | ||
type PossiblePlaceholders = { | ||
Identifier: Identifier; | ||
StringLiteral: StringLiteral; | ||
Expression: Expression; | ||
Statement: Statement; | ||
Declaration: Declaration; | ||
BlockStatement: BlockStatement; | ||
ClassBody: ClassBody; | ||
Pattern: Pattern; | ||
}; | ||
type PlaceholderTypes = keyof PossiblePlaceholders; | ||
type PluginList = PluginConfig[]; | ||
@@ -1624,0 +1630,0 @@ |
{ | ||
"name": "@babel/parser", | ||
"version": "8.0.0-alpha.11", | ||
"version": "8.0.0-alpha.12", | ||
"description": "A JavaScript parser", | ||
@@ -37,8 +37,8 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"devDependencies": { | ||
"@babel/code-frame": "^8.0.0-alpha.11", | ||
"@babel/helper-check-duplicate-nodes": "^8.0.0-alpha.11", | ||
"@babel/helper-fixtures": "^8.0.0-alpha.11", | ||
"@babel/helper-string-parser": "^8.0.0-alpha.11", | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.11", | ||
"@babel/types": "^8.0.0-alpha.11", | ||
"@babel/code-frame": "^8.0.0-alpha.12", | ||
"@babel/helper-check-duplicate-nodes": "^8.0.0-alpha.12", | ||
"@babel/helper-fixtures": "^8.0.0-alpha.12", | ||
"@babel/helper-string-parser": "^8.0.0-alpha.12", | ||
"@babel/helper-validator-identifier": "^8.0.0-alpha.12", | ||
"@babel/types": "^8.0.0-alpha.12", | ||
"charcodes": "^0.2.0" | ||
@@ -45,0 +45,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29436
2400925