Skip to content

Commit

Permalink
Add VariableDeclarator to AnyNode type
Browse files Browse the repository at this point in the history
FIX: Include `VariableDeclarator` in the `AnyNode` type so that walker objects
can refer to it without getting a type error.

Closes #1294
  • Loading branch information
marijnh committed Apr 18, 2024
1 parent 757da7b commit 88234f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acorn/src/acorn.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ export type ModuleDeclaration =
| ExportDefaultDeclaration
| ExportAllDeclaration

export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator

export function parse(input: string, options: Options): Program

Expand Down

0 comments on commit 88234f5

Please sign in to comment.