@@ -562,7 +562,7 @@ export type ModuleDeclaration =
562562| ExportDefaultDeclaration
563563| ExportAllDeclaration
564564
565- 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
565+ 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
566566
567567export function parse ( input : string , options : Options ) : Program
568568
@@ -573,16 +573,15 @@ export function tokenizer(input: string, options: Options): {
573573 [ Symbol . iterator ] ( ) : Iterator < Token >
574574}
575575
576- export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | "latest"
576+ export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest"
577577
578578export interface Options {
579579 /**
580- * `ecmaVersion` indicates the ECMAScript version to parse. Must be
581- * either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
582- * (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
583- * (the latest version the library supports). This influences
584- * support for strict mode, the set of reserved words, and support
585- * for new syntax features.
580+ * `ecmaVersion` indicates the ECMAScript version to parse. Can be a
581+ * number, either in year (`2022`) or plain version number (`6`) form,
582+ * or `"latest"` (the latest the library supports). This influences
583+ * support for strict mode, the set of reserved words, and support for
584+ * new syntax features.
586585 */
587586 ecmaVersion : ecmaVersion
588587
@@ -733,7 +732,7 @@ export class Parser {
733732 options : Options
734733 input : string
735734
736- private constructor ( options : Options , input : string , startPos ?: number )
735+ protected constructor ( options : Options , input : string , startPos ?: number )
737736 parse ( ) : Program
738737
739738 static parse ( input : string , options : Options ) : Program
0 commit comments