@engine262/engine262 0.0.1-0574c6b92a2925de851f895445b7cfd7e97cc0ba

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.
Files changed (993) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +149 -0
  3. package/bin/engine262.js +5 -0
  4. package/declaration/abstract-ops/all.d.mts +36 -0
  5. package/declaration/abstract-ops/all.d.mts.map +1 -0
  6. package/declaration/abstract-ops/arguments-operations.d.mts +14 -0
  7. package/declaration/abstract-ops/arguments-operations.d.mts.map +1 -0
  8. package/declaration/abstract-ops/array-objects.d.mts +15 -0
  9. package/declaration/abstract-ops/array-objects.d.mts.map +1 -0
  10. package/declaration/abstract-ops/arraybuffer-objects.d.mts +41 -0
  11. package/declaration/abstract-ops/arraybuffer-objects.d.mts.map +1 -0
  12. package/declaration/abstract-ops/async-function-operations.d.mts +7 -0
  13. package/declaration/abstract-ops/async-function-operations.d.mts.map +1 -0
  14. package/declaration/abstract-ops/async-generator-objects.d.mts +39 -0
  15. package/declaration/abstract-ops/async-generator-objects.d.mts.map +1 -0
  16. package/declaration/abstract-ops/data-types-and-values.d.mts +6 -0
  17. package/declaration/abstract-ops/data-types-and-values.d.mts.map +1 -0
  18. package/declaration/abstract-ops/dataview-objects.d.mts +32 -0
  19. package/declaration/abstract-ops/dataview-objects.d.mts.map +1 -0
  20. package/declaration/abstract-ops/date-objects.d.mts +46 -0
  21. package/declaration/abstract-ops/date-objects.d.mts.map +1 -0
  22. package/declaration/abstract-ops/error-objects.d.mts +8 -0
  23. package/declaration/abstract-ops/error-objects.d.mts.map +1 -0
  24. package/declaration/abstract-ops/execution-contexts.d.mts +22 -0
  25. package/declaration/abstract-ops/execution-contexts.d.mts.map +1 -0
  26. package/declaration/abstract-ops/function-operations.d.mts +96 -0
  27. package/declaration/abstract-ops/function-operations.d.mts.map +1 -0
  28. package/declaration/abstract-ops/generator-operations.d.mts +39 -0
  29. package/declaration/abstract-ops/generator-operations.d.mts.map +1 -0
  30. package/declaration/abstract-ops/global-object.d.mts +12 -0
  31. package/declaration/abstract-ops/global-object.d.mts.map +1 -0
  32. package/declaration/abstract-ops/immutable-prototype-objects.d.mts +7 -0
  33. package/declaration/abstract-ops/immutable-prototype-objects.d.mts.map +1 -0
  34. package/declaration/abstract-ops/import-calls.d.mts +5 -0
  35. package/declaration/abstract-ops/import-calls.d.mts.map +1 -0
  36. package/declaration/abstract-ops/iterator-operations.d.mts +54 -0
  37. package/declaration/abstract-ops/iterator-operations.d.mts.map +1 -0
  38. package/declaration/abstract-ops/keyed-collections.d.mts +4 -0
  39. package/declaration/abstract-ops/keyed-collections.d.mts.map +1 -0
  40. package/declaration/abstract-ops/module-namespace-exotic-objects.d.mts +16 -0
  41. package/declaration/abstract-ops/module-namespace-exotic-objects.d.mts.map +1 -0
  42. package/declaration/abstract-ops/module-records.d.mts +38 -0
  43. package/declaration/abstract-ops/module-records.d.mts.map +1 -0
  44. package/declaration/abstract-ops/notational-conventions.d.mts +14 -0
  45. package/declaration/abstract-ops/notational-conventions.d.mts.map +1 -0
  46. package/declaration/abstract-ops/object-operations.d.mts +91 -0
  47. package/declaration/abstract-ops/object-operations.d.mts.map +1 -0
  48. package/declaration/abstract-ops/objects.d.mts +31 -0
  49. package/declaration/abstract-ops/objects.d.mts.map +1 -0
  50. package/declaration/abstract-ops/private-names.d.mts +36 -0
  51. package/declaration/abstract-ops/private-names.d.mts.map +1 -0
  52. package/declaration/abstract-ops/promise-operations.d.mts +63 -0
  53. package/declaration/abstract-ops/promise-operations.d.mts.map +1 -0
  54. package/declaration/abstract-ops/proxy-objects.d.mts +6 -0
  55. package/declaration/abstract-ops/proxy-objects.d.mts.map +1 -0
  56. package/declaration/abstract-ops/realms.d.mts +173 -0
  57. package/declaration/abstract-ops/realms.d.mts.map +1 -0
  58. package/declaration/abstract-ops/reference-operations.d.mts +30 -0
  59. package/declaration/abstract-ops/reference-operations.d.mts.map +1 -0
  60. package/declaration/abstract-ops/regexp-objects.d.mts +40 -0
  61. package/declaration/abstract-ops/regexp-objects.d.mts.map +1 -0
  62. package/declaration/abstract-ops/shared-arraybuffer.d.mts +4 -0
  63. package/declaration/abstract-ops/shared-arraybuffer.d.mts.map +1 -0
  64. package/declaration/abstract-ops/spec-types.d.mts +34 -0
  65. package/declaration/abstract-ops/spec-types.d.mts.map +1 -0
  66. package/declaration/abstract-ops/string-objects.d.mts +8 -0
  67. package/declaration/abstract-ops/string-objects.d.mts.map +1 -0
  68. package/declaration/abstract-ops/symbol-objects.d.mts +6 -0
  69. package/declaration/abstract-ops/symbol-objects.d.mts.map +1 -0
  70. package/declaration/abstract-ops/testing-comparison.d.mts +47 -0
  71. package/declaration/abstract-ops/testing-comparison.d.mts.map +1 -0
  72. package/declaration/abstract-ops/type-conversion.d.mts +56 -0
  73. package/declaration/abstract-ops/type-conversion.d.mts.map +1 -0
  74. package/declaration/abstract-ops/typedarray-objects.d.mts +33 -0
  75. package/declaration/abstract-ops/typedarray-objects.d.mts.map +1 -0
  76. package/declaration/abstract-ops/weak-operations.d.mts +12 -0
  77. package/declaration/abstract-ops/weak-operations.d.mts.map +1 -0
  78. package/declaration/api.d.mts +71 -0
  79. package/declaration/api.d.mts.map +1 -0
  80. package/declaration/completion.d.mts +165 -0
  81. package/declaration/completion.d.mts.map +1 -0
  82. package/declaration/environment.d.mts +201 -0
  83. package/declaration/environment.d.mts.map +1 -0
  84. package/declaration/evaluator.d.mts +42 -0
  85. package/declaration/evaluator.d.mts.map +1 -0
  86. package/declaration/helpers.d.mts +103 -0
  87. package/declaration/helpers.d.mts.map +1 -0
  88. package/declaration/host-defined/debugger-eval.d.mts +3 -0
  89. package/declaration/host-defined/debugger-eval.d.mts.map +1 -0
  90. package/declaration/host-defined/debugger-util.d.mts +2 -0
  91. package/declaration/host-defined/debugger-util.d.mts.map +1 -0
  92. package/declaration/host-defined/engine.d.mts +178 -0
  93. package/declaration/host-defined/engine.d.mts.map +1 -0
  94. package/declaration/host-defined/inspect.d.mts +4 -0
  95. package/declaration/host-defined/inspect.d.mts.map +1 -0
  96. package/declaration/host-defined/test262-intrinsics.d.mts +8 -0
  97. package/declaration/host-defined/test262-intrinsics.d.mts.map +1 -0
  98. package/declaration/index.d.mts +32 -0
  99. package/declaration/index.d.mts.map +1 -0
  100. package/declaration/intrinsics/AggregateError.d.mts +3 -0
  101. package/declaration/intrinsics/AggregateError.d.mts.map +1 -0
  102. package/declaration/intrinsics/AggregateErrorPrototype.d.mts +3 -0
  103. package/declaration/intrinsics/AggregateErrorPrototype.d.mts.map +1 -0
  104. package/declaration/intrinsics/Array.d.mts +3 -0
  105. package/declaration/intrinsics/Array.d.mts.map +1 -0
  106. package/declaration/intrinsics/ArrayBuffer.d.mts +3 -0
  107. package/declaration/intrinsics/ArrayBuffer.d.mts.map +1 -0
  108. package/declaration/intrinsics/ArrayBufferPrototype.d.mts +3 -0
  109. package/declaration/intrinsics/ArrayBufferPrototype.d.mts.map +1 -0
  110. package/declaration/intrinsics/ArrayIteratorPrototype.d.mts +3 -0
  111. package/declaration/intrinsics/ArrayIteratorPrototype.d.mts.map +1 -0
  112. package/declaration/intrinsics/ArrayPrototype.d.mts +3 -0
  113. package/declaration/intrinsics/ArrayPrototype.d.mts.map +1 -0
  114. package/declaration/intrinsics/ArrayPrototypeShared.d.mts +11 -0
  115. package/declaration/intrinsics/ArrayPrototypeShared.d.mts.map +1 -0
  116. package/declaration/intrinsics/AsyncFromSyncIteratorPrototype.d.mts +6 -0
  117. package/declaration/intrinsics/AsyncFromSyncIteratorPrototype.d.mts.map +1 -0
  118. package/declaration/intrinsics/AsyncFunction.d.mts +3 -0
  119. package/declaration/intrinsics/AsyncFunction.d.mts.map +1 -0
  120. package/declaration/intrinsics/AsyncFunctionPrototype.d.mts +3 -0
  121. package/declaration/intrinsics/AsyncFunctionPrototype.d.mts.map +1 -0
  122. package/declaration/intrinsics/AsyncGeneratorFunction.d.mts +3 -0
  123. package/declaration/intrinsics/AsyncGeneratorFunction.d.mts.map +1 -0
  124. package/declaration/intrinsics/AsyncGeneratorFunctionPrototype.d.mts +3 -0
  125. package/declaration/intrinsics/AsyncGeneratorFunctionPrototype.d.mts.map +1 -0
  126. package/declaration/intrinsics/AsyncGeneratorFunctionPrototypePrototype.d.mts +3 -0
  127. package/declaration/intrinsics/AsyncGeneratorFunctionPrototypePrototype.d.mts.map +1 -0
  128. package/declaration/intrinsics/AsyncIteratorPrototype.d.mts +3 -0
  129. package/declaration/intrinsics/AsyncIteratorPrototype.d.mts.map +1 -0
  130. package/declaration/intrinsics/BigInt.d.mts +8 -0
  131. package/declaration/intrinsics/BigInt.d.mts.map +1 -0
  132. package/declaration/intrinsics/BigIntPrototype.d.mts +3 -0
  133. package/declaration/intrinsics/BigIntPrototype.d.mts.map +1 -0
  134. package/declaration/intrinsics/Boolean.d.mts +8 -0
  135. package/declaration/intrinsics/Boolean.d.mts.map +1 -0
  136. package/declaration/intrinsics/BooleanPrototype.d.mts +3 -0
  137. package/declaration/intrinsics/BooleanPrototype.d.mts.map +1 -0
  138. package/declaration/intrinsics/DataView.d.mts +11 -0
  139. package/declaration/intrinsics/DataView.d.mts.map +1 -0
  140. package/declaration/intrinsics/DataViewPrototype.d.mts +3 -0
  141. package/declaration/intrinsics/DataViewPrototype.d.mts.map +1 -0
  142. package/declaration/intrinsics/Date.d.mts +8 -0
  143. package/declaration/intrinsics/Date.d.mts.map +1 -0
  144. package/declaration/intrinsics/DatePrototype.d.mts +12 -0
  145. package/declaration/intrinsics/DatePrototype.d.mts.map +1 -0
  146. package/declaration/intrinsics/Error.d.mts +10 -0
  147. package/declaration/intrinsics/Error.d.mts.map +1 -0
  148. package/declaration/intrinsics/ErrorPrototype.d.mts +3 -0
  149. package/declaration/intrinsics/ErrorPrototype.d.mts.map +1 -0
  150. package/declaration/intrinsics/FinalizationRegistry.d.mts +16 -0
  151. package/declaration/intrinsics/FinalizationRegistry.d.mts.map +1 -0
  152. package/declaration/intrinsics/FinalizationRegistryPrototype.d.mts +3 -0
  153. package/declaration/intrinsics/FinalizationRegistryPrototype.d.mts.map +1 -0
  154. package/declaration/intrinsics/ForInIteratorPrototype.d.mts +13 -0
  155. package/declaration/intrinsics/ForInIteratorPrototype.d.mts.map +1 -0
  156. package/declaration/intrinsics/Function.d.mts +3 -0
  157. package/declaration/intrinsics/Function.d.mts.map +1 -0
  158. package/declaration/intrinsics/FunctionPrototype.d.mts +13 -0
  159. package/declaration/intrinsics/FunctionPrototype.d.mts.map +1 -0
  160. package/declaration/intrinsics/GeneratorFunction.d.mts +3 -0
  161. package/declaration/intrinsics/GeneratorFunction.d.mts.map +1 -0
  162. package/declaration/intrinsics/GeneratorFunctionPrototype.d.mts +3 -0
  163. package/declaration/intrinsics/GeneratorFunctionPrototype.d.mts.map +1 -0
  164. package/declaration/intrinsics/GeneratorFunctionPrototypePrototype.d.mts +3 -0
  165. package/declaration/intrinsics/GeneratorFunctionPrototypePrototype.d.mts.map +1 -0
  166. package/declaration/intrinsics/Iterator.d.mts +3 -0
  167. package/declaration/intrinsics/Iterator.d.mts.map +1 -0
  168. package/declaration/intrinsics/IteratorHelperPrototype.d.mts +3 -0
  169. package/declaration/intrinsics/IteratorHelperPrototype.d.mts.map +1 -0
  170. package/declaration/intrinsics/IteratorPrototype.d.mts +3 -0
  171. package/declaration/intrinsics/IteratorPrototype.d.mts.map +1 -0
  172. package/declaration/intrinsics/JSON.d.mts +9 -0
  173. package/declaration/intrinsics/JSON.d.mts.map +1 -0
  174. package/declaration/intrinsics/Map.d.mts +13 -0
  175. package/declaration/intrinsics/Map.d.mts.map +1 -0
  176. package/declaration/intrinsics/MapIteratorPrototype.d.mts +7 -0
  177. package/declaration/intrinsics/MapIteratorPrototype.d.mts.map +1 -0
  178. package/declaration/intrinsics/MapPrototype.d.mts +3 -0
  179. package/declaration/intrinsics/MapPrototype.d.mts.map +1 -0
  180. package/declaration/intrinsics/Math.d.mts +4 -0
  181. package/declaration/intrinsics/Math.d.mts.map +1 -0
  182. package/declaration/intrinsics/NativeError.d.mts +6 -0
  183. package/declaration/intrinsics/NativeError.d.mts.map +1 -0
  184. package/declaration/intrinsics/Number.d.mts +7 -0
  185. package/declaration/intrinsics/Number.d.mts.map +1 -0
  186. package/declaration/intrinsics/NumberPrototype.d.mts +3 -0
  187. package/declaration/intrinsics/NumberPrototype.d.mts.map +1 -0
  188. package/declaration/intrinsics/Object.d.mts +3 -0
  189. package/declaration/intrinsics/Object.d.mts.map +1 -0
  190. package/declaration/intrinsics/ObjectPrototype.d.mts +5 -0
  191. package/declaration/intrinsics/ObjectPrototype.d.mts.map +1 -0
  192. package/declaration/intrinsics/Promise.d.mts +16 -0
  193. package/declaration/intrinsics/Promise.d.mts.map +1 -0
  194. package/declaration/intrinsics/PromisePrototype.d.mts +3 -0
  195. package/declaration/intrinsics/PromisePrototype.d.mts.map +1 -0
  196. package/declaration/intrinsics/Proxy.d.mts +12 -0
  197. package/declaration/intrinsics/Proxy.d.mts.map +1 -0
  198. package/declaration/intrinsics/Reflect.d.mts +3 -0
  199. package/declaration/intrinsics/Reflect.d.mts.map +1 -0
  200. package/declaration/intrinsics/RegExp.d.mts +14 -0
  201. package/declaration/intrinsics/RegExp.d.mts.map +1 -0
  202. package/declaration/intrinsics/RegExpPrototype.d.mts +18 -0
  203. package/declaration/intrinsics/RegExpPrototype.d.mts.map +1 -0
  204. package/declaration/intrinsics/RegExpStringIteratorPrototype.d.mts +7 -0
  205. package/declaration/intrinsics/RegExpStringIteratorPrototype.d.mts.map +1 -0
  206. package/declaration/intrinsics/Set.d.mts +8 -0
  207. package/declaration/intrinsics/Set.d.mts.map +1 -0
  208. package/declaration/intrinsics/SetIteratorPrototype.d.mts +7 -0
  209. package/declaration/intrinsics/SetIteratorPrototype.d.mts.map +1 -0
  210. package/declaration/intrinsics/SetPrototype.d.mts +3 -0
  211. package/declaration/intrinsics/SetPrototype.d.mts.map +1 -0
  212. package/declaration/intrinsics/String.d.mts +9 -0
  213. package/declaration/intrinsics/String.d.mts.map +1 -0
  214. package/declaration/intrinsics/StringIteratorPrototype.d.mts +3 -0
  215. package/declaration/intrinsics/StringIteratorPrototype.d.mts.map +1 -0
  216. package/declaration/intrinsics/StringPrototype.d.mts +3 -0
  217. package/declaration/intrinsics/StringPrototype.d.mts.map +1 -0
  218. package/declaration/intrinsics/Symbol.d.mts +12 -0
  219. package/declaration/intrinsics/Symbol.d.mts.map +1 -0
  220. package/declaration/intrinsics/SymbolPrototype.d.mts +3 -0
  221. package/declaration/intrinsics/SymbolPrototype.d.mts.map +1 -0
  222. package/declaration/intrinsics/ThrowTypeError.d.mts +3 -0
  223. package/declaration/intrinsics/ThrowTypeError.d.mts.map +1 -0
  224. package/declaration/intrinsics/TypedArray.d.mts +182 -0
  225. package/declaration/intrinsics/TypedArray.d.mts.map +1 -0
  226. package/declaration/intrinsics/TypedArrayConstructors.d.mts +3 -0
  227. package/declaration/intrinsics/TypedArrayConstructors.d.mts.map +1 -0
  228. package/declaration/intrinsics/TypedArrayPrototype.d.mts +3 -0
  229. package/declaration/intrinsics/TypedArrayPrototype.d.mts.map +1 -0
  230. package/declaration/intrinsics/TypedArrayPrototypes.d.mts +4 -0
  231. package/declaration/intrinsics/TypedArrayPrototypes.d.mts.map +1 -0
  232. package/declaration/intrinsics/TypedArray_Uint8Array.d.mts +3 -0
  233. package/declaration/intrinsics/TypedArray_Uint8Array.d.mts.map +1 -0
  234. package/declaration/intrinsics/URIHandling.d.mts +3 -0
  235. package/declaration/intrinsics/URIHandling.d.mts.map +1 -0
  236. package/declaration/intrinsics/WeakMap.d.mts +11 -0
  237. package/declaration/intrinsics/WeakMap.d.mts.map +1 -0
  238. package/declaration/intrinsics/WeakMapPrototype.d.mts +3 -0
  239. package/declaration/intrinsics/WeakMapPrototype.d.mts.map +1 -0
  240. package/declaration/intrinsics/WeakRef.d.mts +8 -0
  241. package/declaration/intrinsics/WeakRef.d.mts.map +1 -0
  242. package/declaration/intrinsics/WeakRefPrototype.d.mts +3 -0
  243. package/declaration/intrinsics/WeakRefPrototype.d.mts.map +1 -0
  244. package/declaration/intrinsics/WeakSet.d.mts +8 -0
  245. package/declaration/intrinsics/WeakSet.d.mts.map +1 -0
  246. package/declaration/intrinsics/WeakSetPrototype.d.mts +3 -0
  247. package/declaration/intrinsics/WeakSetPrototype.d.mts.map +1 -0
  248. package/declaration/intrinsics/WrapForValidIteratorPrototype.d.mts +3 -0
  249. package/declaration/intrinsics/WrapForValidIteratorPrototype.d.mts.map +1 -0
  250. package/declaration/intrinsics/bootstrap.d.mts +18 -0
  251. package/declaration/intrinsics/bootstrap.d.mts.map +1 -0
  252. package/declaration/intrinsics/eval.d.mts +3 -0
  253. package/declaration/intrinsics/eval.d.mts.map +1 -0
  254. package/declaration/intrinsics/isFinite.d.mts +3 -0
  255. package/declaration/intrinsics/isFinite.d.mts.map +1 -0
  256. package/declaration/intrinsics/isNaN.d.mts +3 -0
  257. package/declaration/intrinsics/isNaN.d.mts.map +1 -0
  258. package/declaration/intrinsics/parseFloat.d.mts +3 -0
  259. package/declaration/intrinsics/parseFloat.d.mts.map +1 -0
  260. package/declaration/intrinsics/parseInt.d.mts +3 -0
  261. package/declaration/intrinsics/parseInt.d.mts.map +1 -0
  262. package/declaration/messages.d.mts +183 -0
  263. package/declaration/messages.d.mts.map +1 -0
  264. package/declaration/modules.d.mts +125 -0
  265. package/declaration/modules.d.mts.map +1 -0
  266. package/declaration/parse.d.mts +35 -0
  267. package/declaration/parse.d.mts.map +1 -0
  268. package/declaration/parser/BaseParser.d.mts +24 -0
  269. package/declaration/parser/BaseParser.d.mts.map +1 -0
  270. package/declaration/parser/ExpressionParser.d.mts +54 -0
  271. package/declaration/parser/ExpressionParser.d.mts.map +1 -0
  272. package/declaration/parser/FunctionParser.d.mts +43 -0
  273. package/declaration/parser/FunctionParser.d.mts.map +1 -0
  274. package/declaration/parser/IdentifierParser.d.mts +12 -0
  275. package/declaration/parser/IdentifierParser.d.mts.map +1 -0
  276. package/declaration/parser/LanguageParser.d.mts +10 -0
  277. package/declaration/parser/LanguageParser.d.mts.map +1 -0
  278. package/declaration/parser/Lexer.d.mts +69 -0
  279. package/declaration/parser/Lexer.d.mts.map +1 -0
  280. package/declaration/parser/ModuleParser.d.mts +18 -0
  281. package/declaration/parser/ModuleParser.d.mts.map +1 -0
  282. package/declaration/parser/ParseNode.d.mts +1178 -0
  283. package/declaration/parser/ParseNode.d.mts.map +1 -0
  284. package/declaration/parser/Parser.d.mts +35 -0
  285. package/declaration/parser/Parser.d.mts.map +1 -0
  286. package/declaration/parser/RegExpParser.d.mts +65 -0
  287. package/declaration/parser/RegExpParser.d.mts.map +1 -0
  288. package/declaration/parser/Scope.d.mts +106 -0
  289. package/declaration/parser/Scope.d.mts.map +1 -0
  290. package/declaration/parser/StatementParser.d.mts +49 -0
  291. package/declaration/parser/StatementParser.d.mts.map +1 -0
  292. package/declaration/parser/tokens.d.mts +32 -0
  293. package/declaration/parser/tokens.d.mts.map +1 -0
  294. package/declaration/parser/utils.d.mts +10 -0
  295. package/declaration/parser/utils.d.mts.map +1 -0
  296. package/declaration/runtime-semantics/AdditiveExpression.d.mts +3 -0
  297. package/declaration/runtime-semantics/AdditiveExpression.d.mts.map +1 -0
  298. package/declaration/runtime-semantics/ApplyStringOrNumericBinaryOperator.d.mts +11 -0
  299. package/declaration/runtime-semantics/ApplyStringOrNumericBinaryOperator.d.mts.map +1 -0
  300. package/declaration/runtime-semantics/ArgumentListEvaluation.d.mts +5 -0
  301. package/declaration/runtime-semantics/ArgumentListEvaluation.d.mts.map +1 -0
  302. package/declaration/runtime-semantics/ArrayLiteral.d.mts +5 -0
  303. package/declaration/runtime-semantics/ArrayLiteral.d.mts.map +1 -0
  304. package/declaration/runtime-semantics/ArrowFunction.d.mts +4 -0
  305. package/declaration/runtime-semantics/ArrowFunction.d.mts.map +1 -0
  306. package/declaration/runtime-semantics/AssignmentExpression.d.mts +8 -0
  307. package/declaration/runtime-semantics/AssignmentExpression.d.mts.map +1 -0
  308. package/declaration/runtime-semantics/AsyncArrowFunction.d.mts +4 -0
  309. package/declaration/runtime-semantics/AsyncArrowFunction.d.mts.map +1 -0
  310. package/declaration/runtime-semantics/AsyncFunctionExpression.d.mts +4 -0
  311. package/declaration/runtime-semantics/AsyncFunctionExpression.d.mts.map +1 -0
  312. package/declaration/runtime-semantics/AsyncGeneratorExpression.d.mts +4 -0
  313. package/declaration/runtime-semantics/AsyncGeneratorExpression.d.mts.map +1 -0
  314. package/declaration/runtime-semantics/AwaitExpression.d.mts +5 -0
  315. package/declaration/runtime-semantics/AwaitExpression.d.mts.map +1 -0
  316. package/declaration/runtime-semantics/BindingInitialization.d.mts +8 -0
  317. package/declaration/runtime-semantics/BindingInitialization.d.mts.map +1 -0
  318. package/declaration/runtime-semantics/BitwiseOperators.d.mts +5 -0
  319. package/declaration/runtime-semantics/BitwiseOperators.d.mts.map +1 -0
  320. package/declaration/runtime-semantics/Block.d.mts +8 -0
  321. package/declaration/runtime-semantics/Block.d.mts.map +1 -0
  322. package/declaration/runtime-semantics/BreakStatement.d.mts +4 -0
  323. package/declaration/runtime-semantics/BreakStatement.d.mts.map +1 -0
  324. package/declaration/runtime-semantics/BreakableStatement.d.mts +4 -0
  325. package/declaration/runtime-semantics/BreakableStatement.d.mts.map +1 -0
  326. package/declaration/runtime-semantics/CallExpression.d.mts +5 -0
  327. package/declaration/runtime-semantics/CallExpression.d.mts.map +1 -0
  328. package/declaration/runtime-semantics/ClassDeclaration.d.mts +7 -0
  329. package/declaration/runtime-semantics/ClassDeclaration.d.mts.map +1 -0
  330. package/declaration/runtime-semantics/ClassDefinitionEvaluation.d.mts +18 -0
  331. package/declaration/runtime-semantics/ClassDefinitionEvaluation.d.mts.map +1 -0
  332. package/declaration/runtime-semantics/ClassExpression.d.mts +5 -0
  333. package/declaration/runtime-semantics/ClassExpression.d.mts.map +1 -0
  334. package/declaration/runtime-semantics/ClassFieldDefinitionEvaluation.d.mts +10 -0
  335. package/declaration/runtime-semantics/ClassFieldDefinitionEvaluation.d.mts.map +1 -0
  336. package/declaration/runtime-semantics/ClassStaticBlockDefinitionEvaluation.d.mts +10 -0
  337. package/declaration/runtime-semantics/ClassStaticBlockDefinitionEvaluation.d.mts.map +1 -0
  338. package/declaration/runtime-semantics/CoalesceExpression.d.mts +5 -0
  339. package/declaration/runtime-semantics/CoalesceExpression.d.mts.map +1 -0
  340. package/declaration/runtime-semantics/CommaOperator.d.mts +5 -0
  341. package/declaration/runtime-semantics/CommaOperator.d.mts.map +1 -0
  342. package/declaration/runtime-semantics/ConditionalExpression.d.mts +5 -0
  343. package/declaration/runtime-semantics/ConditionalExpression.d.mts.map +1 -0
  344. package/declaration/runtime-semantics/ContinueStatement.d.mts +4 -0
  345. package/declaration/runtime-semantics/ContinueStatement.d.mts.map +1 -0
  346. package/declaration/runtime-semantics/CreateDynamicFunction.d.mts +10 -0
  347. package/declaration/runtime-semantics/CreateDynamicFunction.d.mts.map +1 -0
  348. package/declaration/runtime-semantics/DebuggerStatement.d.mts +5 -0
  349. package/declaration/runtime-semantics/DebuggerStatement.d.mts.map +1 -0
  350. package/declaration/runtime-semantics/DefineMethod.d.mts +10 -0
  351. package/declaration/runtime-semantics/DefineMethod.d.mts.map +1 -0
  352. package/declaration/runtime-semantics/DestructuringAssignmentEvaluation.d.mts +5 -0
  353. package/declaration/runtime-semantics/DestructuringAssignmentEvaluation.d.mts.map +1 -0
  354. package/declaration/runtime-semantics/EmptyStatement.d.mts +5 -0
  355. package/declaration/runtime-semantics/EmptyStatement.d.mts.map +1 -0
  356. package/declaration/runtime-semantics/EqualityExpression.d.mts +4 -0
  357. package/declaration/runtime-semantics/EqualityExpression.d.mts.map +1 -0
  358. package/declaration/runtime-semantics/EvaluateBody.d.mts +37 -0
  359. package/declaration/runtime-semantics/EvaluateBody.d.mts.map +1 -0
  360. package/declaration/runtime-semantics/EvaluateCall.d.mts +5 -0
  361. package/declaration/runtime-semantics/EvaluateCall.d.mts.map +1 -0
  362. package/declaration/runtime-semantics/EvaluatePropertyAccess.d.mts +9 -0
  363. package/declaration/runtime-semantics/EvaluatePropertyAccess.d.mts.map +1 -0
  364. package/declaration/runtime-semantics/EvaluateStringOrNumericBinaryExpression.d.mts +6 -0
  365. package/declaration/runtime-semantics/EvaluateStringOrNumericBinaryExpression.d.mts.map +1 -0
  366. package/declaration/runtime-semantics/ExponentiationExpression.d.mts +5 -0
  367. package/declaration/runtime-semantics/ExponentiationExpression.d.mts.map +1 -0
  368. package/declaration/runtime-semantics/ExportDeclaration.d.mts +17 -0
  369. package/declaration/runtime-semantics/ExportDeclaration.d.mts.map +1 -0
  370. package/declaration/runtime-semantics/ExpressionStatement.d.mts +5 -0
  371. package/declaration/runtime-semantics/ExpressionStatement.d.mts.map +1 -0
  372. package/declaration/runtime-semantics/FunctionDeclaration.d.mts +5 -0
  373. package/declaration/runtime-semantics/FunctionDeclaration.d.mts.map +1 -0
  374. package/declaration/runtime-semantics/FunctionDeclarationInstantiation.d.mts +6 -0
  375. package/declaration/runtime-semantics/FunctionDeclarationInstantiation.d.mts.map +1 -0
  376. package/declaration/runtime-semantics/FunctionExpression.d.mts +4 -0
  377. package/declaration/runtime-semantics/FunctionExpression.d.mts.map +1 -0
  378. package/declaration/runtime-semantics/FunctionStatementList.d.mts +4 -0
  379. package/declaration/runtime-semantics/FunctionStatementList.d.mts.map +1 -0
  380. package/declaration/runtime-semantics/GeneratorExpression.d.mts +4 -0
  381. package/declaration/runtime-semantics/GeneratorExpression.d.mts.map +1 -0
  382. package/declaration/runtime-semantics/GetSubstitution.d.mts +5 -0
  383. package/declaration/runtime-semantics/GetSubstitution.d.mts.map +1 -0
  384. package/declaration/runtime-semantics/GlobalDeclarationInstantiation.d.mts +12 -0
  385. package/declaration/runtime-semantics/GlobalDeclarationInstantiation.d.mts.map +1 -0
  386. package/declaration/runtime-semantics/HoistableDeclaration.d.mts +5 -0
  387. package/declaration/runtime-semantics/HoistableDeclaration.d.mts.map +1 -0
  388. package/declaration/runtime-semantics/IdentifierReference.d.mts +6 -0
  389. package/declaration/runtime-semantics/IdentifierReference.d.mts.map +1 -0
  390. package/declaration/runtime-semantics/IfStatement.d.mts +17 -0
  391. package/declaration/runtime-semantics/IfStatement.d.mts.map +1 -0
  392. package/declaration/runtime-semantics/ImportCall.d.mts +6 -0
  393. package/declaration/runtime-semantics/ImportCall.d.mts.map +1 -0
  394. package/declaration/runtime-semantics/ImportDeclaration.d.mts +5 -0
  395. package/declaration/runtime-semantics/ImportDeclaration.d.mts.map +1 -0
  396. package/declaration/runtime-semantics/ImportMeta.d.mts +5 -0
  397. package/declaration/runtime-semantics/ImportMeta.d.mts.map +1 -0
  398. package/declaration/runtime-semantics/InstantiateArrowFunctionExpression.d.mts +5 -0
  399. package/declaration/runtime-semantics/InstantiateArrowFunctionExpression.d.mts.map +1 -0
  400. package/declaration/runtime-semantics/InstantiateAsyncArrowFunctionExpression.d.mts +5 -0
  401. package/declaration/runtime-semantics/InstantiateAsyncArrowFunctionExpression.d.mts.map +1 -0
  402. package/declaration/runtime-semantics/InstantiateAsyncFunctionExpression.d.mts +5 -0
  403. package/declaration/runtime-semantics/InstantiateAsyncFunctionExpression.d.mts.map +1 -0
  404. package/declaration/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.d.mts +5 -0
  405. package/declaration/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.d.mts.map +1 -0
  406. package/declaration/runtime-semantics/InstantiateFunctionObject.d.mts +12 -0
  407. package/declaration/runtime-semantics/InstantiateFunctionObject.d.mts.map +1 -0
  408. package/declaration/runtime-semantics/InstantiateGeneratorFunctionExpression.d.mts +5 -0
  409. package/declaration/runtime-semantics/InstantiateGeneratorFunctionExpression.d.mts.map +1 -0
  410. package/declaration/runtime-semantics/InstantiateOrdinaryFunctionExpression.d.mts +5 -0
  411. package/declaration/runtime-semantics/InstantiateOrdinaryFunctionExpression.d.mts.map +1 -0
  412. package/declaration/runtime-semantics/IteratorBindingInitialization.d.mts +8 -0
  413. package/declaration/runtime-semantics/IteratorBindingInitialization.d.mts.map +1 -0
  414. package/declaration/runtime-semantics/KeyedBindingInitialization.d.mts +6 -0
  415. package/declaration/runtime-semantics/KeyedBindingInitialization.d.mts.map +1 -0
  416. package/declaration/runtime-semantics/LabelledEvaluation.d.mts +8 -0
  417. package/declaration/runtime-semantics/LabelledEvaluation.d.mts.map +1 -0
  418. package/declaration/runtime-semantics/LabelledStatement.d.mts +4 -0
  419. package/declaration/runtime-semantics/LabelledStatement.d.mts.map +1 -0
  420. package/declaration/runtime-semantics/LexicalDeclaration.d.mts +8 -0
  421. package/declaration/runtime-semantics/LexicalDeclaration.d.mts.map +1 -0
  422. package/declaration/runtime-semantics/Literal.d.mts +6 -0
  423. package/declaration/runtime-semantics/Literal.d.mts.map +1 -0
  424. package/declaration/runtime-semantics/LogicalANDExpression.d.mts +5 -0
  425. package/declaration/runtime-semantics/LogicalANDExpression.d.mts.map +1 -0
  426. package/declaration/runtime-semantics/LogicalORExpression.d.mts +5 -0
  427. package/declaration/runtime-semantics/LogicalORExpression.d.mts.map +1 -0
  428. package/declaration/runtime-semantics/MV.d.mts +3 -0
  429. package/declaration/runtime-semantics/MV.d.mts.map +1 -0
  430. package/declaration/runtime-semantics/MemberExpression.d.mts +5 -0
  431. package/declaration/runtime-semantics/MemberExpression.d.mts.map +1 -0
  432. package/declaration/runtime-semantics/MethodDefinitionEvaluation.d.mts +15 -0
  433. package/declaration/runtime-semantics/MethodDefinitionEvaluation.d.mts.map +1 -0
  434. package/declaration/runtime-semantics/Module.d.mts +17 -0
  435. package/declaration/runtime-semantics/Module.d.mts.map +1 -0
  436. package/declaration/runtime-semantics/ModuleBody.d.mts +4 -0
  437. package/declaration/runtime-semantics/ModuleBody.d.mts.map +1 -0
  438. package/declaration/runtime-semantics/MultiplicativeExpression.d.mts +5 -0
  439. package/declaration/runtime-semantics/MultiplicativeExpression.d.mts.map +1 -0
  440. package/declaration/runtime-semantics/NamedEvaluation.d.mts +4 -0
  441. package/declaration/runtime-semantics/NamedEvaluation.d.mts.map +1 -0
  442. package/declaration/runtime-semantics/NewExpression.d.mts +5 -0
  443. package/declaration/runtime-semantics/NewExpression.d.mts.map +1 -0
  444. package/declaration/runtime-semantics/NewTarget.d.mts +3 -0
  445. package/declaration/runtime-semantics/NewTarget.d.mts.map +1 -0
  446. package/declaration/runtime-semantics/NumberToBigInt.d.mts +10 -0
  447. package/declaration/runtime-semantics/NumberToBigInt.d.mts.map +1 -0
  448. package/declaration/runtime-semantics/ObjectLiteral.d.mts +5 -0
  449. package/declaration/runtime-semantics/ObjectLiteral.d.mts.map +1 -0
  450. package/declaration/runtime-semantics/OptionalExpression.d.mts +5 -0
  451. package/declaration/runtime-semantics/OptionalExpression.d.mts.map +1 -0
  452. package/declaration/runtime-semantics/ParenthesizedExpression.d.mts +4 -0
  453. package/declaration/runtime-semantics/ParenthesizedExpression.d.mts.map +1 -0
  454. package/declaration/runtime-semantics/PropertyBindingInitialization.d.mts +6 -0
  455. package/declaration/runtime-semantics/PropertyBindingInitialization.d.mts.map +1 -0
  456. package/declaration/runtime-semantics/PropertyDefinitionEvaluation.d.mts +6 -0
  457. package/declaration/runtime-semantics/PropertyDefinitionEvaluation.d.mts.map +1 -0
  458. package/declaration/runtime-semantics/PropertyName.d.mts +5 -0
  459. package/declaration/runtime-semantics/PropertyName.d.mts.map +1 -0
  460. package/declaration/runtime-semantics/RegExp.d.mts +36 -0
  461. package/declaration/runtime-semantics/RegExp.d.mts.map +1 -0
  462. package/declaration/runtime-semantics/RegularExpressionLiteral.d.mts +4 -0
  463. package/declaration/runtime-semantics/RegularExpressionLiteral.d.mts.map +1 -0
  464. package/declaration/runtime-semantics/RelationalExpression.d.mts +20 -0
  465. package/declaration/runtime-semantics/RelationalExpression.d.mts.map +1 -0
  466. package/declaration/runtime-semantics/RestBindingInitialization.d.mts +5 -0
  467. package/declaration/runtime-semantics/RestBindingInitialization.d.mts.map +1 -0
  468. package/declaration/runtime-semantics/ReturnStatement.d.mts +6 -0
  469. package/declaration/runtime-semantics/ReturnStatement.d.mts.map +1 -0
  470. package/declaration/runtime-semantics/Script.d.mts +5 -0
  471. package/declaration/runtime-semantics/Script.d.mts.map +1 -0
  472. package/declaration/runtime-semantics/ScriptBody.d.mts +3 -0
  473. package/declaration/runtime-semantics/ScriptBody.d.mts.map +1 -0
  474. package/declaration/runtime-semantics/ShiftExpression.d.mts +7 -0
  475. package/declaration/runtime-semantics/ShiftExpression.d.mts.map +1 -0
  476. package/declaration/runtime-semantics/StatementList.d.mts +5 -0
  477. package/declaration/runtime-semantics/StatementList.d.mts.map +1 -0
  478. package/declaration/runtime-semantics/StringIndexOf.d.mts +3 -0
  479. package/declaration/runtime-semantics/StringIndexOf.d.mts.map +1 -0
  480. package/declaration/runtime-semantics/StringPad.d.mts +5 -0
  481. package/declaration/runtime-semantics/StringPad.d.mts.map +1 -0
  482. package/declaration/runtime-semantics/SuperCall.d.mts +11 -0
  483. package/declaration/runtime-semantics/SuperCall.d.mts.map +1 -0
  484. package/declaration/runtime-semantics/SuperProperty.d.mts +5 -0
  485. package/declaration/runtime-semantics/SuperProperty.d.mts.map +1 -0
  486. package/declaration/runtime-semantics/SwitchStatement.d.mts +9 -0
  487. package/declaration/runtime-semantics/SwitchStatement.d.mts.map +1 -0
  488. package/declaration/runtime-semantics/TaggedTemplateExpression.d.mts +5 -0
  489. package/declaration/runtime-semantics/TaggedTemplateExpression.d.mts.map +1 -0
  490. package/declaration/runtime-semantics/TemplateLiteral.d.mts +5 -0
  491. package/declaration/runtime-semantics/TemplateLiteral.d.mts.map +1 -0
  492. package/declaration/runtime-semantics/This.d.mts +5 -0
  493. package/declaration/runtime-semantics/This.d.mts.map +1 -0
  494. package/declaration/runtime-semantics/ThrowStatement.d.mts +10 -0
  495. package/declaration/runtime-semantics/ThrowStatement.d.mts.map +1 -0
  496. package/declaration/runtime-semantics/TrimString.d.mts +5 -0
  497. package/declaration/runtime-semantics/TrimString.d.mts.map +1 -0
  498. package/declaration/runtime-semantics/TryStatement.d.mts +16 -0
  499. package/declaration/runtime-semantics/TryStatement.d.mts.map +1 -0
  500. package/declaration/runtime-semantics/UnaryExpression.d.mts +10 -0
  501. package/declaration/runtime-semantics/UnaryExpression.d.mts.map +1 -0
  502. package/declaration/runtime-semantics/Unicode.d.mts +161 -0
  503. package/declaration/runtime-semantics/Unicode.d.mts.map +1 -0
  504. package/declaration/runtime-semantics/UpdateExpression.d.mts +4 -0
  505. package/declaration/runtime-semantics/UpdateExpression.d.mts.map +1 -0
  506. package/declaration/runtime-semantics/VariableStatement.d.mts +7 -0
  507. package/declaration/runtime-semantics/VariableStatement.d.mts.map +1 -0
  508. package/declaration/runtime-semantics/WithStatement.d.mts +16 -0
  509. package/declaration/runtime-semantics/WithStatement.d.mts.map +1 -0
  510. package/declaration/runtime-semantics/YieldExpression.d.mts +5 -0
  511. package/declaration/runtime-semantics/YieldExpression.d.mts.map +1 -0
  512. package/declaration/runtime-semantics/all.d.mts +109 -0
  513. package/declaration/runtime-semantics/all.d.mts.map +1 -0
  514. package/declaration/static-semantics/BodyText.d.mts +4 -0
  515. package/declaration/static-semantics/BodyText.d.mts.map +1 -0
  516. package/declaration/static-semantics/BoundNames.d.mts +4 -0
  517. package/declaration/static-semantics/BoundNames.d.mts.map +1 -0
  518. package/declaration/static-semantics/CharacterValue.d.mts +6 -0
  519. package/declaration/static-semantics/CharacterValue.d.mts.map +1 -0
  520. package/declaration/static-semantics/CodePointAt.d.mts +8 -0
  521. package/declaration/static-semantics/CodePointAt.d.mts.map +1 -0
  522. package/declaration/static-semantics/CodePointsToString.d.mts +3 -0
  523. package/declaration/static-semantics/CodePointsToString.d.mts.map +1 -0
  524. package/declaration/static-semantics/ConstructorMethod.d.mts +4 -0
  525. package/declaration/static-semantics/ConstructorMethod.d.mts.map +1 -0
  526. package/declaration/static-semantics/ContainsArguments.d.mts +4 -0
  527. package/declaration/static-semantics/ContainsArguments.d.mts.map +1 -0
  528. package/declaration/static-semantics/ContainsExpression.d.mts +3 -0
  529. package/declaration/static-semantics/ContainsExpression.d.mts.map +1 -0
  530. package/declaration/static-semantics/DeclarationPart.d.mts +3 -0
  531. package/declaration/static-semantics/DeclarationPart.d.mts.map +1 -0
  532. package/declaration/static-semantics/ExpectedArgumentCount.d.mts +3 -0
  533. package/declaration/static-semantics/ExpectedArgumentCount.d.mts.map +1 -0
  534. package/declaration/static-semantics/ExportEntries.d.mts +11 -0
  535. package/declaration/static-semantics/ExportEntries.d.mts.map +1 -0
  536. package/declaration/static-semantics/ExportEntriesForModule.d.mts +5 -0
  537. package/declaration/static-semantics/ExportEntriesForModule.d.mts.map +1 -0
  538. package/declaration/static-semantics/FlagText.d.mts +4 -0
  539. package/declaration/static-semantics/FlagText.d.mts.map +1 -0
  540. package/declaration/static-semantics/HasInitializer.d.mts +5 -0
  541. package/declaration/static-semantics/HasInitializer.d.mts.map +1 -0
  542. package/declaration/static-semantics/HasName.d.mts +3 -0
  543. package/declaration/static-semantics/HasName.d.mts.map +1 -0
  544. package/declaration/static-semantics/ImportEntries.d.mts +10 -0
  545. package/declaration/static-semantics/ImportEntries.d.mts.map +1 -0
  546. package/declaration/static-semantics/ImportEntriesForModule.d.mts +4 -0
  547. package/declaration/static-semantics/ImportEntriesForModule.d.mts.map +1 -0
  548. package/declaration/static-semantics/ImportedLocalNames.d.mts +4 -0
  549. package/declaration/static-semantics/ImportedLocalNames.d.mts.map +1 -0
  550. package/declaration/static-semantics/IsAnonymousFunctionDefinition.d.mts +4 -0
  551. package/declaration/static-semantics/IsAnonymousFunctionDefinition.d.mts.map +1 -0
  552. package/declaration/static-semantics/IsComputedPropertyKey.d.mts +3 -0
  553. package/declaration/static-semantics/IsComputedPropertyKey.d.mts.map +1 -0
  554. package/declaration/static-semantics/IsConstantDeclaration.d.mts +3 -0
  555. package/declaration/static-semantics/IsConstantDeclaration.d.mts.map +1 -0
  556. package/declaration/static-semantics/IsDestructuring.d.mts +4 -0
  557. package/declaration/static-semantics/IsDestructuring.d.mts.map +1 -0
  558. package/declaration/static-semantics/IsFunctionDefinition.d.mts +6 -0
  559. package/declaration/static-semantics/IsFunctionDefinition.d.mts.map +1 -0
  560. package/declaration/static-semantics/IsIdentifierRef.d.mts +3 -0
  561. package/declaration/static-semantics/IsIdentifierRef.d.mts.map +1 -0
  562. package/declaration/static-semantics/IsInTailPosition.d.mts +3 -0
  563. package/declaration/static-semantics/IsInTailPosition.d.mts.map +1 -0
  564. package/declaration/static-semantics/IsSimpleParameterList.d.mts +3 -0
  565. package/declaration/static-semantics/IsSimpleParameterList.d.mts.map +1 -0
  566. package/declaration/static-semantics/IsStatic.d.mts +4 -0
  567. package/declaration/static-semantics/IsStatic.d.mts.map +1 -0
  568. package/declaration/static-semantics/IsStrict.d.mts +4 -0
  569. package/declaration/static-semantics/IsStrict.d.mts.map +1 -0
  570. package/declaration/static-semantics/IsStringWellFormedUnicode.d.mts +3 -0
  571. package/declaration/static-semantics/IsStringWellFormedUnicode.d.mts.map +1 -0
  572. package/declaration/static-semantics/LexicallyDeclaredNames.d.mts +4 -0
  573. package/declaration/static-semantics/LexicallyDeclaredNames.d.mts.map +1 -0
  574. package/declaration/static-semantics/LexicallyScopedDeclarations.d.mts +3 -0
  575. package/declaration/static-semantics/LexicallyScopedDeclarations.d.mts.map +1 -0
  576. package/declaration/static-semantics/ModuleRequests.d.mts +15 -0
  577. package/declaration/static-semantics/ModuleRequests.d.mts.map +1 -0
  578. package/declaration/static-semantics/NonConstructorElements.d.mts +4 -0
  579. package/declaration/static-semantics/NonConstructorElements.d.mts.map +1 -0
  580. package/declaration/static-semantics/NumericValue.d.mts +4 -0
  581. package/declaration/static-semantics/NumericValue.d.mts.map +1 -0
  582. package/declaration/static-semantics/PrivateBoundIdentifiers.d.mts +5 -0
  583. package/declaration/static-semantics/PrivateBoundIdentifiers.d.mts.map +1 -0
  584. package/declaration/static-semantics/PropName.d.mts +3 -0
  585. package/declaration/static-semantics/PropName.d.mts.map +1 -0
  586. package/declaration/static-semantics/StringToCodePoints.d.mts +3 -0
  587. package/declaration/static-semantics/StringToCodePoints.d.mts.map +1 -0
  588. package/declaration/static-semantics/StringValue.d.mts +3 -0
  589. package/declaration/static-semantics/StringValue.d.mts.map +1 -0
  590. package/declaration/static-semantics/TemplateStrings.d.mts +5 -0
  591. package/declaration/static-semantics/TemplateStrings.d.mts.map +1 -0
  592. package/declaration/static-semantics/TopLevelLexicallyDeclaredNames.d.mts +4 -0
  593. package/declaration/static-semantics/TopLevelLexicallyDeclaredNames.d.mts.map +1 -0
  594. package/declaration/static-semantics/TopLevelLexicallyScopedDeclarations.d.mts +4 -0
  595. package/declaration/static-semantics/TopLevelLexicallyScopedDeclarations.d.mts.map +1 -0
  596. package/declaration/static-semantics/TopLevelVarDeclaredNames.d.mts +4 -0
  597. package/declaration/static-semantics/TopLevelVarDeclaredNames.d.mts.map +1 -0
  598. package/declaration/static-semantics/TopLevelVarScopedDeclarations.d.mts +4 -0
  599. package/declaration/static-semantics/TopLevelVarScopedDeclarations.d.mts.map +1 -0
  600. package/declaration/static-semantics/UTF16EncodeCodePoint.d.mts +4 -0
  601. package/declaration/static-semantics/UTF16EncodeCodePoint.d.mts.map +1 -0
  602. package/declaration/static-semantics/UTF16SurrogatePairToCodePoint.d.mts +4 -0
  603. package/declaration/static-semantics/UTF16SurrogatePairToCodePoint.d.mts.map +1 -0
  604. package/declaration/static-semantics/VarDeclaredNames.d.mts +4 -0
  605. package/declaration/static-semantics/VarDeclaredNames.d.mts.map +1 -0
  606. package/declaration/static-semantics/VarScopedDeclarations.d.mts +4 -0
  607. package/declaration/static-semantics/VarScopedDeclarations.d.mts.map +1 -0
  608. package/declaration/static-semantics/all.d.mts +48 -0
  609. package/declaration/static-semantics/all.d.mts.map +1 -0
  610. package/declaration/value.d.mts +297 -0
  611. package/declaration/value.d.mts.map +1 -0
  612. package/lib/engine262.d.mts +1 -0
  613. package/lib/engine262.d.ts +1 -0
  614. package/lib/engine262.js +62868 -0
  615. package/lib/engine262.js.map +1 -0
  616. package/lib/engine262.mjs +62268 -0
  617. package/lib/engine262.mjs.map +1 -0
  618. package/lib/inspector/context.d.mts +35 -0
  619. package/lib/inspector/context.d.mts.map +1 -0
  620. package/lib/inspector/context.mjs +347 -0
  621. package/lib/inspector/context.mjs.map +1 -0
  622. package/lib/inspector/index.d.mts +16 -0
  623. package/lib/inspector/index.d.mts.map +1 -0
  624. package/lib/inspector/index.mjs +115 -0
  625. package/lib/inspector/index.mjs.map +1 -0
  626. package/lib/inspector/inspect.d.mts +11 -0
  627. package/lib/inspector/inspect.d.mts.map +1 -0
  628. package/lib/inspector/inspect.mjs +403 -0
  629. package/lib/inspector/inspect.mjs.map +1 -0
  630. package/lib/inspector/internal-utils.d.mts +4 -0
  631. package/lib/inspector/internal-utils.d.mts.map +1 -0
  632. package/lib/inspector/internal-utils.mjs +17 -0
  633. package/lib/inspector/internal-utils.mjs.map +1 -0
  634. package/lib/inspector/methods.d.mts +7 -0
  635. package/lib/inspector/methods.d.mts.map +1 -0
  636. package/lib/inspector/methods.mjs +308 -0
  637. package/lib/inspector/methods.mjs.map +1 -0
  638. package/lib/inspector/types.d.mts +220 -0
  639. package/lib/inspector/types.d.mts.map +1 -0
  640. package/lib/inspector/types.mjs +2 -0
  641. package/lib/inspector/types.mjs.map +1 -0
  642. package/lib/inspector/utils.d.mts +8 -0
  643. package/lib/inspector/utils.d.mts.map +1 -0
  644. package/lib/inspector/utils.mjs +62 -0
  645. package/lib/inspector/utils.mjs.map +1 -0
  646. package/lib/inspector.d.mts +1 -0
  647. package/lib/inspector.d.ts +1 -0
  648. package/lib/inspector.js +1495 -0
  649. package/lib/inspector.js.map +1 -0
  650. package/lib/inspector.mjs +1488 -0
  651. package/lib/inspector.mjs.map +1 -0
  652. package/lib/node/bin.d.mts +3 -0
  653. package/lib/node/bin.d.mts.map +1 -0
  654. package/lib/node/bin.mjs +223 -0
  655. package/lib/node/bin.mjs.map +1 -0
  656. package/lib/node/example.d.mts +2 -0
  657. package/lib/node/example.d.mts.map +1 -0
  658. package/lib/node/example.mjs +52 -0
  659. package/lib/node/example.mjs.map +1 -0
  660. package/lib/node/inspector.d.mts +15 -0
  661. package/lib/node/inspector.d.mts.map +1 -0
  662. package/lib/node/inspector.mjs +112 -0
  663. package/lib/node/inspector.mjs.map +1 -0
  664. package/lib/node/module.d.mts +7 -0
  665. package/lib/node/module.d.mts.map +1 -0
  666. package/lib/node/module.mjs +79 -0
  667. package/lib/node/module.mjs.map +1 -0
  668. package/lib-src/inspector/context.mts +410 -0
  669. package/lib-src/inspector/index.mts +137 -0
  670. package/lib-src/inspector/inspect.mts +474 -0
  671. package/lib-src/inspector/internal-utils.mts +18 -0
  672. package/lib-src/inspector/js_protocol.json +3288 -0
  673. package/lib-src/inspector/methods.mts +333 -0
  674. package/lib-src/inspector/tsconfig.json +17 -0
  675. package/lib-src/inspector/types.mts +225 -0
  676. package/lib-src/inspector/utils.mts +81 -0
  677. package/lib-src/node/bin.mts +240 -0
  678. package/lib-src/node/example.mts +58 -0
  679. package/lib-src/node/inspector.mts +124 -0
  680. package/lib-src/node/module.mts +85 -0
  681. package/lib-src/node/tsconfig.json +21 -0
  682. package/package.json +152 -0
  683. package/src/abstract-ops/all.mts +35 -0
  684. package/src/abstract-ops/arguments-operations.mts +245 -0
  685. package/src/abstract-ops/array-objects.mts +312 -0
  686. package/src/abstract-ops/arraybuffer-objects.mts +246 -0
  687. package/src/abstract-ops/async-function-operations.mts +46 -0
  688. package/src/abstract-ops/async-generator-objects.mts +346 -0
  689. package/src/abstract-ops/data-types-and-values.mts +43 -0
  690. package/src/abstract-ops/dataview-objects.mts +149 -0
  691. package/src/abstract-ops/date-objects.mts +232 -0
  692. package/src/abstract-ops/error-objects.mts +38 -0
  693. package/src/abstract-ops/execution-contexts.mts +80 -0
  694. package/src/abstract-ops/function-operations.mts +651 -0
  695. package/src/abstract-ops/generator-operations.mts +326 -0
  696. package/src/abstract-ops/global-object.mts +386 -0
  697. package/src/abstract-ops/immutable-prototype-objects.mts +21 -0
  698. package/src/abstract-ops/import-calls.mts +117 -0
  699. package/src/abstract-ops/iterator-operations.mts +311 -0
  700. package/src/abstract-ops/keyed-collections.mts +19 -0
  701. package/src/abstract-ops/module-namespace-exotic-objects.mts +351 -0
  702. package/src/abstract-ops/module-records.mts +588 -0
  703. package/src/abstract-ops/notational-conventions.mts +56 -0
  704. package/src/abstract-ops/object-operations.mts +599 -0
  705. package/src/abstract-ops/objects.mts +435 -0
  706. package/src/abstract-ops/private-names.mts +106 -0
  707. package/src/abstract-ops/promise-operations.mts +482 -0
  708. package/src/abstract-ops/proxy-objects.mts +579 -0
  709. package/src/abstract-ops/realms.mts +525 -0
  710. package/src/abstract-ops/reference-operations.mts +211 -0
  711. package/src/abstract-ops/regexp-objects.mts +306 -0
  712. package/src/abstract-ops/shared-arraybuffer.mts +8 -0
  713. package/src/abstract-ops/spec-types.mts +220 -0
  714. package/src/abstract-ops/string-objects.mts +156 -0
  715. package/src/abstract-ops/symbol-objects.mts +30 -0
  716. package/src/abstract-ops/testing-comparison.mts +380 -0
  717. package/src/abstract-ops/type-conversion.mts +564 -0
  718. package/src/abstract-ops/typedarray-objects.mts +396 -0
  719. package/src/abstract-ops/weak-operations.mts +79 -0
  720. package/src/api.mts +469 -0
  721. package/src/completion.mts +482 -0
  722. package/src/environment.mts +973 -0
  723. package/src/evaluator.mts +300 -0
  724. package/src/helpers.mts +591 -0
  725. package/src/host-defined/debugger-eval.mts +143 -0
  726. package/src/host-defined/debugger-util.mts +15 -0
  727. package/src/host-defined/engine.mts +604 -0
  728. package/src/host-defined/inspect.mts +246 -0
  729. package/src/host-defined/test262-intrinsics.mts +164 -0
  730. package/src/index.mts +37 -0
  731. package/src/intrinsics/AggregateError.mts +68 -0
  732. package/src/intrinsics/AggregateErrorPrototype.mts +12 -0
  733. package/src/intrinsics/Array.mts +409 -0
  734. package/src/intrinsics/ArrayBuffer.mts +48 -0
  735. package/src/intrinsics/ArrayBufferPrototype.mts +120 -0
  736. package/src/intrinsics/ArrayIteratorPrototype.mts +23 -0
  737. package/src/intrinsics/ArrayPrototype.mts +755 -0
  738. package/src/intrinsics/ArrayPrototypeShared.mts +691 -0
  739. package/src/intrinsics/AsyncFromSyncIteratorPrototype.mts +164 -0
  740. package/src/intrinsics/AsyncFunction.mts +31 -0
  741. package/src/intrinsics/AsyncFunctionPrototype.mts +8 -0
  742. package/src/intrinsics/AsyncGeneratorFunction.mts +37 -0
  743. package/src/intrinsics/AsyncGeneratorFunctionPrototype.mts +19 -0
  744. package/src/intrinsics/AsyncGeneratorFunctionPrototypePrototype.mts +148 -0
  745. package/src/intrinsics/AsyncIteratorPrototype.mts +17 -0
  746. package/src/intrinsics/BigInt.mts +69 -0
  747. package/src/intrinsics/BigIntPrototype.mts +83 -0
  748. package/src/intrinsics/Boolean.mts +47 -0
  749. package/src/intrinsics/BooleanPrototype.mts +58 -0
  750. package/src/intrinsics/DataView.mts +82 -0
  751. package/src/intrinsics/DataViewPrototype.mts +271 -0
  752. package/src/intrinsics/Date.mts +218 -0
  753. package/src/intrinsics/DatePrototype.mts +779 -0
  754. package/src/intrinsics/Error.mts +83 -0
  755. package/src/intrinsics/ErrorPrototype.mts +113 -0
  756. package/src/intrinsics/FinalizationRegistry.mts +65 -0
  757. package/src/intrinsics/FinalizationRegistryPrototype.mts +109 -0
  758. package/src/intrinsics/ForInIteratorPrototype.mts +120 -0
  759. package/src/intrinsics/Function.mts +21 -0
  760. package/src/intrinsics/FunctionPrototype.mts +274 -0
  761. package/src/intrinsics/GeneratorFunction.mts +32 -0
  762. package/src/intrinsics/GeneratorFunctionPrototype.mts +21 -0
  763. package/src/intrinsics/GeneratorFunctionPrototypePrototype.mts +59 -0
  764. package/src/intrinsics/Iterator.mts +72 -0
  765. package/src/intrinsics/IteratorHelperPrototype.mts +61 -0
  766. package/src/intrinsics/IteratorPrototype.mts +712 -0
  767. package/src/intrinsics/JSON.mts +738 -0
  768. package/src/intrinsics/Map.mts +128 -0
  769. package/src/intrinsics/MapIteratorPrototype.mts +81 -0
  770. package/src/intrinsics/MapPrototype.mts +295 -0
  771. package/src/intrinsics/Math.mts +288 -0
  772. package/src/intrinsics/NativeError.mts +88 -0
  773. package/src/intrinsics/Number.mts +131 -0
  774. package/src/intrinsics/NumberPrototype.mts +125 -0
  775. package/src/intrinsics/Object.mts +465 -0
  776. package/src/intrinsics/ObjectPrototype.mts +333 -0
  777. package/src/intrinsics/Promise.mts +700 -0
  778. package/src/intrinsics/PromisePrototype.mts +125 -0
  779. package/src/intrinsics/Proxy.mts +102 -0
  780. package/src/intrinsics/Reflect.mts +211 -0
  781. package/src/intrinsics/RegExp.mts +166 -0
  782. package/src/intrinsics/RegExpPrototype.mts +761 -0
  783. package/src/intrinsics/RegExpStringIteratorPrototype.mts +73 -0
  784. package/src/intrinsics/Set.mts +75 -0
  785. package/src/intrinsics/SetIteratorPrototype.mts +78 -0
  786. package/src/intrinsics/SetPrototype.mts +715 -0
  787. package/src/intrinsics/String.mts +135 -0
  788. package/src/intrinsics/StringIteratorPrototype.mts +23 -0
  789. package/src/intrinsics/StringPrototype.mts +858 -0
  790. package/src/intrinsics/Symbol.mts +103 -0
  791. package/src/intrinsics/SymbolPrototype.mts +83 -0
  792. package/src/intrinsics/ThrowTypeError.mts +21 -0
  793. package/src/intrinsics/TypedArray.mts +576 -0
  794. package/src/intrinsics/TypedArrayConstructors.mts +85 -0
  795. package/src/intrinsics/TypedArrayPrototype.mts +722 -0
  796. package/src/intrinsics/TypedArrayPrototypes.mts +17 -0
  797. package/src/intrinsics/TypedArray_Uint8Array.mts +446 -0
  798. package/src/intrinsics/URIHandling.mts +277 -0
  799. package/src/intrinsics/WeakMap.mts +56 -0
  800. package/src/intrinsics/WeakMapPrototype.mts +202 -0
  801. package/src/intrinsics/WeakRef.mts +42 -0
  802. package/src/intrinsics/WeakRefPrototype.mts +23 -0
  803. package/src/intrinsics/WeakSet.mts +66 -0
  804. package/src/intrinsics/WeakSetPrototype.mts +99 -0
  805. package/src/intrinsics/WrapForValidIteratorPrototype.mts +66 -0
  806. package/src/intrinsics/bootstrap.mts +152 -0
  807. package/src/intrinsics/eval.mts +25 -0
  808. package/src/intrinsics/isFinite.mts +23 -0
  809. package/src/intrinsics/isNaN.mts +23 -0
  810. package/src/intrinsics/parseFloat.mts +78 -0
  811. package/src/intrinsics/parseInt.mts +101 -0
  812. package/src/messages.mts +198 -0
  813. package/src/modules.mts +773 -0
  814. package/src/parse.mts +254 -0
  815. package/src/parser/BaseParser.mts +36 -0
  816. package/src/parser/ExpressionParser.mts +1519 -0
  817. package/src/parser/FunctionParser.mts +389 -0
  818. package/src/parser/IdentifierParser.mts +144 -0
  819. package/src/parser/LanguageParser.mts +110 -0
  820. package/src/parser/Lexer.mts +1057 -0
  821. package/src/parser/ModuleParser.mts +328 -0
  822. package/src/parser/ParseNode.mts +2728 -0
  823. package/src/parser/Parser.mts +200 -0
  824. package/src/parser/RegExpParser.mts +1413 -0
  825. package/src/parser/Scope.mts +538 -0
  826. package/src/parser/StatementParser.mts +958 -0
  827. package/src/parser/tokens.mts +212 -0
  828. package/src/parser/unicode.d.ts +20 -0
  829. package/src/parser/utils.mts +114 -0
  830. package/src/runtime-semantics/AdditiveExpression.mts +29 -0
  831. package/src/runtime-semantics/ApplyStringOrNumericBinaryOperator.mts +79 -0
  832. package/src/runtime-semantics/ArgumentListEvaluation.mts +178 -0
  833. package/src/runtime-semantics/ArrayLiteral.mts +99 -0
  834. package/src/runtime-semantics/ArrowFunction.mts +8 -0
  835. package/src/runtime-semantics/AssignmentExpression.mts +281 -0
  836. package/src/runtime-semantics/AsyncArrowFunction.mts +8 -0
  837. package/src/runtime-semantics/AsyncFunctionExpression.mts +11 -0
  838. package/src/runtime-semantics/AsyncGeneratorExpression.mts +11 -0
  839. package/src/runtime-semantics/AwaitExpression.mts +17 -0
  840. package/src/runtime-semantics/BindingInitialization.mts +93 -0
  841. package/src/runtime-semantics/BitwiseOperators.mts +14 -0
  842. package/src/runtime-semantics/Block.mts +73 -0
  843. package/src/runtime-semantics/BreakStatement.mts +18 -0
  844. package/src/runtime-semantics/BreakableStatement.mts +18 -0
  845. package/src/runtime-semantics/CallExpression.mts +59 -0
  846. package/src/runtime-semantics/ClassDeclaration.mts +38 -0
  847. package/src/runtime-semantics/ClassDefinitionEvaluation.mts +352 -0
  848. package/src/runtime-semantics/ClassExpression.mts +23 -0
  849. package/src/runtime-semantics/ClassFieldDefinitionEvaluation.mts +60 -0
  850. package/src/runtime-semantics/ClassStaticBlockDefinitionEvaluation.mts +44 -0
  851. package/src/runtime-semantics/CoalesceExpression.mts +24 -0
  852. package/src/runtime-semantics/CommaOperator.mts +18 -0
  853. package/src/runtime-semantics/ConditionalExpression.mts +31 -0
  854. package/src/runtime-semantics/ContinueStatement.mts +18 -0
  855. package/src/runtime-semantics/CreateDynamicFunction.mts +200 -0
  856. package/src/runtime-semantics/DebuggerStatement.mts +19 -0
  857. package/src/runtime-semantics/DefineMethod.mts +41 -0
  858. package/src/runtime-semantics/DestructuringAssignmentEvaluation.mts +306 -0
  859. package/src/runtime-semantics/EmptyStatement.mts +9 -0
  860. package/src/runtime-semantics/EqualityExpression.mts +60 -0
  861. package/src/runtime-semantics/EvaluateBody.mts +200 -0
  862. package/src/runtime-semantics/EvaluateCall.mts +63 -0
  863. package/src/runtime-semantics/EvaluatePropertyAccess.mts +39 -0
  864. package/src/runtime-semantics/EvaluateStringOrNumericBinaryExpression.mts +19 -0
  865. package/src/runtime-semantics/ExponentiationExpression.mts +11 -0
  866. package/src/runtime-semantics/ExportDeclaration.mts +90 -0
  867. package/src/runtime-semantics/ExpressionStatement.mts +14 -0
  868. package/src/runtime-semantics/FunctionDeclaration.mts +11 -0
  869. package/src/runtime-semantics/FunctionDeclarationInstantiation.mts +274 -0
  870. package/src/runtime-semantics/FunctionExpression.mts +11 -0
  871. package/src/runtime-semantics/FunctionStatementList.mts +11 -0
  872. package/src/runtime-semantics/GeneratorExpression.mts +11 -0
  873. package/src/runtime-semantics/GetSubstitution.mts +90 -0
  874. package/src/runtime-semantics/GlobalDeclarationInstantiation.mts +142 -0
  875. package/src/runtime-semantics/HoistableDeclaration.mts +12 -0
  876. package/src/runtime-semantics/IdentifierReference.mts +15 -0
  877. package/src/runtime-semantics/IfStatement.mts +49 -0
  878. package/src/runtime-semantics/ImportCall.mts +134 -0
  879. package/src/runtime-semantics/ImportDeclaration.mts +9 -0
  880. package/src/runtime-semantics/ImportMeta.mts +45 -0
  881. package/src/runtime-semantics/InstantiateArrowFunctionExpression.mts +35 -0
  882. package/src/runtime-semantics/InstantiateAsyncArrowFunctionExpression.mts +37 -0
  883. package/src/runtime-semantics/InstantiateAsyncFunctionExpression.mts +75 -0
  884. package/src/runtime-semantics/InstantiateAsyncGeneratorFunctionExpression.mts +90 -0
  885. package/src/runtime-semantics/InstantiateFunctionObject.mts +123 -0
  886. package/src/runtime-semantics/InstantiateGeneratorFunctionExpression.mts +82 -0
  887. package/src/runtime-semantics/InstantiateOrdinaryFunctionExpression.mts +65 -0
  888. package/src/runtime-semantics/IteratorBindingInitialization.mts +213 -0
  889. package/src/runtime-semantics/KeyedBindingInitialization.mts +61 -0
  890. package/src/runtime-semantics/LabelledEvaluation.mts +753 -0
  891. package/src/runtime-semantics/LabelledStatement.mts +11 -0
  892. package/src/runtime-semantics/LexicalDeclaration.mts +92 -0
  893. package/src/runtime-semantics/Literal.mts +36 -0
  894. package/src/runtime-semantics/LogicalANDExpression.mts +25 -0
  895. package/src/runtime-semantics/LogicalORExpression.mts +25 -0
  896. package/src/runtime-semantics/MV.mts +10 -0
  897. package/src/runtime-semantics/MemberExpression.mts +71 -0
  898. package/src/runtime-semantics/MethodDefinitionEvaluation.mts +266 -0
  899. package/src/runtime-semantics/Module.mts +15 -0
  900. package/src/runtime-semantics/ModuleBody.mts +10 -0
  901. package/src/runtime-semantics/MultiplicativeExpression.mts +18 -0
  902. package/src/runtime-semantics/NamedEvaluation.mts +96 -0
  903. package/src/runtime-semantics/NewExpression.mts +50 -0
  904. package/src/runtime-semantics/NewTarget.mts +8 -0
  905. package/src/runtime-semantics/NumberToBigInt.mts +17 -0
  906. package/src/runtime-semantics/ObjectLiteral.mts +26 -0
  907. package/src/runtime-semantics/OptionalExpression.mts +128 -0
  908. package/src/runtime-semantics/ParenthesizedExpression.mts +8 -0
  909. package/src/runtime-semantics/PropertyBindingInitialization.mts +45 -0
  910. package/src/runtime-semantics/PropertyDefinitionEvaluation.mts +121 -0
  911. package/src/runtime-semantics/PropertyName.mts +62 -0
  912. package/src/runtime-semantics/RegExp.mts +1325 -0
  913. package/src/runtime-semantics/RegularExpressionLiteral.mts +16 -0
  914. package/src/runtime-semantics/RelationalExpression.mts +152 -0
  915. package/src/runtime-semantics/RestBindingInitialization.mts +29 -0
  916. package/src/runtime-semantics/ReturnStatement.mts +32 -0
  917. package/src/runtime-semantics/Script.mts +15 -0
  918. package/src/runtime-semantics/ScriptBody.mts +7 -0
  919. package/src/runtime-semantics/ShiftExpression.mts +17 -0
  920. package/src/runtime-semantics/StatementList.mts +33 -0
  921. package/src/runtime-semantics/StringIndexOf.mts +43 -0
  922. package/src/runtime-semantics/StringPad.mts +34 -0
  923. package/src/runtime-semantics/SuperCall.mts +65 -0
  924. package/src/runtime-semantics/SuperProperty.mts +58 -0
  925. package/src/runtime-semantics/SwitchStatement.mts +221 -0
  926. package/src/runtime-semantics/TaggedTemplateExpression.mts +23 -0
  927. package/src/runtime-semantics/TemplateLiteral.mts +34 -0
  928. package/src/runtime-semantics/This.mts +9 -0
  929. package/src/runtime-semantics/ThrowStatement.mts +22 -0
  930. package/src/runtime-semantics/TrimString.mts +19 -0
  931. package/src/runtime-semantics/TryStatement.mts +120 -0
  932. package/src/runtime-semantics/UnaryExpression.mts +218 -0
  933. package/src/runtime-semantics/Unicode.mts +250 -0
  934. package/src/runtime-semantics/UpdateExpression.mts +126 -0
  935. package/src/runtime-semantics/VariableStatement.mts +72 -0
  936. package/src/runtime-semantics/WithStatement.mts +33 -0
  937. package/src/runtime-semantics/YieldExpression.mts +174 -0
  938. package/src/runtime-semantics/all.mts +108 -0
  939. package/src/static-semantics/BodyText.mts +7 -0
  940. package/src/static-semantics/BoundNames.mts +101 -0
  941. package/src/static-semantics/CharacterValue.mts +112 -0
  942. package/src/static-semantics/CodePointAt.mts +53 -0
  943. package/src/static-semantics/CodePointsToString.mts +15 -0
  944. package/src/static-semantics/ConstructorMethod.mts +10 -0
  945. package/src/static-semantics/ContainsArguments.mts +33 -0
  946. package/src/static-semantics/ContainsExpression.mts +59 -0
  947. package/src/static-semantics/DeclarationPart.mts +5 -0
  948. package/src/static-semantics/ExpectedArgumentCount.mts +26 -0
  949. package/src/static-semantics/ExportEntries.mts +129 -0
  950. package/src/static-semantics/ExportEntriesForModule.mts +63 -0
  951. package/src/static-semantics/FlagText.mts +7 -0
  952. package/src/static-semantics/HasInitializer.mts +5 -0
  953. package/src/static-semantics/HasName.mts +8 -0
  954. package/src/static-semantics/ImportEntries.mts +36 -0
  955. package/src/static-semantics/ImportEntriesForModule.mts +97 -0
  956. package/src/static-semantics/ImportedLocalNames.mts +14 -0
  957. package/src/static-semantics/IsAnonymousFunctionDefinition.mts +18 -0
  958. package/src/static-semantics/IsComputedPropertyKey.mts +7 -0
  959. package/src/static-semantics/IsConstantDeclaration.mts +5 -0
  960. package/src/static-semantics/IsDestructuring.mts +21 -0
  961. package/src/static-semantics/IsFunctionDefinition.mts +15 -0
  962. package/src/static-semantics/IsIdentifierRef.mts +5 -0
  963. package/src/static-semantics/IsInTailPosition.mts +5 -0
  964. package/src/static-semantics/IsSimpleParameterList.mts +23 -0
  965. package/src/static-semantics/IsStatic.mts +10 -0
  966. package/src/static-semantics/IsStrict.mts +7 -0
  967. package/src/static-semantics/IsStringWellFormedUnicode.mts +24 -0
  968. package/src/static-semantics/LexicallyDeclaredNames.mts +26 -0
  969. package/src/static-semantics/LexicallyScopedDeclarations.mts +82 -0
  970. package/src/static-semantics/ModuleRequests.mts +99 -0
  971. package/src/static-semantics/NonConstructorElements.mts +15 -0
  972. package/src/static-semantics/NumericValue.mts +7 -0
  973. package/src/static-semantics/PrivateBoundIdentifiers.mts +23 -0
  974. package/src/static-semantics/PropName.mts +23 -0
  975. package/src/static-semantics/StringToCodePoints.mts +22 -0
  976. package/src/static-semantics/StringValue.mts +19 -0
  977. package/src/static-semantics/TemplateStrings.mts +109 -0
  978. package/src/static-semantics/TopLevelLexicallyDeclaredNames.mts +21 -0
  979. package/src/static-semantics/TopLevelLexicallyScopedDeclarations.mts +23 -0
  980. package/src/static-semantics/TopLevelVarDeclaredNames.mts +26 -0
  981. package/src/static-semantics/TopLevelVarScopedDeclarations.mts +34 -0
  982. package/src/static-semantics/UTF16EncodeCodePoint.mts +18 -0
  983. package/src/static-semantics/UTF16SurrogatePairToCodePoint.mts +12 -0
  984. package/src/static-semantics/VarDeclaredNames.mts +109 -0
  985. package/src/static-semantics/VarScopedDeclarations.mts +115 -0
  986. package/src/static-semantics/all.mts +47 -0
  987. package/src/syntax-error.d.ts +5 -0
  988. package/src/tsconfig.json +11 -0
  989. package/src/unicode/.gitkeep +0 -0
  990. package/src/unicode/CodePointProperties.json +1 -0
  991. package/src/unicode/PropertyValueAliases.json +426 -0
  992. package/src/unicode/SequenceProperties.json +1 -0
  993. package/src/value.mts +1003 -0
@@ -0,0 +1,2728 @@
1
+ import type { ArrowInfo } from './Scope.mts';
2
+ import type { Character, UnicodeCharacter } from '#self';
3
+
4
+ export interface Position {
5
+ readonly line: number;
6
+ readonly column: number;
7
+ }
8
+
9
+ export interface Location {
10
+ readonly startIndex: number;
11
+ readonly endIndex: number;
12
+ readonly start: Position;
13
+ readonly end: Position;
14
+ }
15
+
16
+ // eslint-disable-next-line @typescript-eslint/no-namespace
17
+ export namespace ParseNode {
18
+ export interface BaseParseNode {
19
+ // NOTE: while we could use `string` here, by limiting `type` to only those types defined in the `ParseNode`
20
+ // union we can ensure that new subtypes of `BaseParseNode` are correctly added to the union.
21
+ readonly type: ParseNode['type'];
22
+ readonly location: Location;
23
+ readonly strict: boolean;
24
+ readonly sourceText: string;
25
+ readonly parent: ParseNode | undefined;
26
+ }
27
+
28
+ // A.1 Lexical Grammar
29
+ // https://tc39.es/ecma262/#sec-lexical-grammar
30
+
31
+ // PrivateIdentifier ::
32
+ // `#` IdentifierName
33
+ export interface PrivateIdentifier extends BaseParseNode {
34
+ readonly type: 'PrivateIdentifier';
35
+ readonly name: string;
36
+ }
37
+
38
+ // IdentifierName ::
39
+ // IdentifierStart
40
+ // IdentifierName IdentifierPart
41
+ export interface IdentifierName extends BaseParseNode {
42
+ readonly type: 'IdentifierName';
43
+ readonly name: string;
44
+ }
45
+
46
+ // NullLiteral ::
47
+ // `null`
48
+ export interface NullLiteral extends BaseParseNode {
49
+ readonly type: 'NullLiteral';
50
+ }
51
+
52
+ // BooleanLiteral ::
53
+ // `true`
54
+ // `false`
55
+ export interface BooleanLiteral extends BaseParseNode {
56
+ readonly type: 'BooleanLiteral';
57
+ readonly value: boolean;
58
+ }
59
+
60
+ // NumericLiteral ::
61
+ // DecimalLiteral
62
+ // DecimalBigIntegerLiteral
63
+ // NonDecimalIntegerLiteral
64
+ // NonDecimalIntegerLiteral BigIntLiteralSuffix
65
+ // LegacyOctalIntegerLiteral
66
+ export interface NumericLiteral extends BaseParseNode {
67
+ readonly type: 'NumericLiteral';
68
+ readonly value: number | bigint;
69
+ }
70
+
71
+ // StringLiteral ::
72
+ // `"` DoubleStringCharacters? `"`
73
+ // `'` SingleStringCharacters? `'`
74
+ export interface StringLiteral extends BaseParseNode {
75
+ readonly type: 'StringLiteral';
76
+ readonly value: string;
77
+ }
78
+
79
+ // RegularExpressionLiteral ::
80
+ // `/` RegularExpressionBody `/` RegularExpressionFlags
81
+ export interface RegularExpressionLiteral extends BaseParseNode {
82
+ readonly type: 'RegularExpressionLiteral';
83
+ readonly RegularExpressionBody: string;
84
+ readonly RegularExpressionFlags: string;
85
+ }
86
+
87
+ // A.2 Expressions
88
+ // https://tc39.es/ecma262/#sec-expressions
89
+
90
+ // IdentifierReference :
91
+ // Identifier
92
+ // [~Yield] `yield`
93
+ // [~Await] `await`
94
+ //
95
+ // Identifier :
96
+ // IdentifierName but not ReservedWord
97
+ export interface IdentifierReference extends BaseParseNode {
98
+ readonly type: 'IdentifierReference';
99
+ readonly escaped: boolean;
100
+ readonly name: string;
101
+ }
102
+
103
+ // BindingIdentifier :
104
+ // Identifier
105
+ // [~Yield] `yield`
106
+ // [~Await] `await`
107
+ //
108
+ // Identifier :
109
+ // IdentifierName but not ReservedWord
110
+ export interface BindingIdentifier extends BaseParseNode {
111
+ readonly type: 'BindingIdentifier';
112
+ readonly name: string;
113
+ }
114
+
115
+ // LabelIdentifier :
116
+ // Identifier
117
+ // [~Yield] `yield`
118
+ // [~Await] `await`
119
+ //
120
+ // Identifier :
121
+ // IdentifierName but not ReservedWord
122
+ export interface LabelIdentifier extends BaseParseNode {
123
+ readonly type: 'LabelIdentifier';
124
+ readonly name: string;
125
+ }
126
+
127
+ // PrimaryExpression :
128
+ // `this`
129
+ // IdentifierReference
130
+ // Literal
131
+ // ArrayLiteral
132
+ // ObjectLiteral
133
+ // FunctionExpression
134
+ // ClassExpression
135
+ // GeneratorExpression
136
+ // AsyncFunctionExpression
137
+ // AsyncGeneratorExpression
138
+ // RegularExpressionLiteral
139
+ // TemplateLiteral
140
+ // CoverParenthesizedExpressionAndArrowParameterList
141
+ export type PrimaryExpression =
142
+ | ThisExpression
143
+ | IdentifierReference
144
+ | Literal
145
+ | ArrayLiteral
146
+ | ObjectLiteral
147
+ | FunctionExpression
148
+ | ClassExpression
149
+ | GeneratorExpression
150
+ | AsyncFunctionExpression
151
+ | AsyncGeneratorExpression
152
+ | RegularExpressionLiteral
153
+ | TemplateLiteral
154
+ | CoverParenthesizedExpressionAndArrowParameterList
155
+ | ParenthesizedExpression;
156
+
157
+ // PrimaryExpression (partial) :
158
+ // `this`
159
+ export interface ThisExpression extends BaseParseNode {
160
+ readonly type: 'ThisExpression';
161
+ }
162
+
163
+ // CoverParenthesizedExpressionAndArrowParameterList :
164
+ // `(` Expression `)`
165
+ // `(` Expression `,` `)`
166
+ // `(` `)`
167
+ // `(` `...` BindingIdentifier `)`
168
+ // `(` `...` BindingPattern `)`
169
+ // `(` Expression `,` `...` BindingIdentifier `)`
170
+ // `(` Expression `.` `...` BindingPattern `)`
171
+ export interface CoverParenthesizedExpressionAndArrowParameterList extends BaseParseNode {
172
+ readonly type: 'CoverParenthesizedExpressionAndArrowParameterList';
173
+ readonly Arguments: readonly (ArgumentListElement | BindingRestElement)[];
174
+ readonly arrowInfo?: ArrowInfo;
175
+ }
176
+
177
+ // CoverParenthesizedExpressionAndArrowParameterList (partial) :
178
+ // `(` Expression `)`
179
+ //
180
+ // ParenthesizedExpression (refined) :
181
+ // `(` Expression `)`
182
+ export interface ParenthesizedExpression extends BaseParseNode {
183
+ readonly type: 'ParenthesizedExpression';
184
+ readonly Expression: Expression;
185
+ }
186
+
187
+ // Literal :
188
+ // NullLiteral
189
+ // BooleanLiteral
190
+ // NumericLiteral
191
+ // StringLiteral
192
+ export type Literal =
193
+ | NullLiteral
194
+ | BooleanLiteral
195
+ | NumericLiteral
196
+ | StringLiteral;
197
+
198
+ // ArrayLiteral :
199
+ // `[` `]`
200
+ // `[` Elision `]`
201
+ // `[` ElementList `]`
202
+ // `[` ElementList `,` `]`
203
+ // `[` ElementList `,` Elision `]`
204
+ export interface ArrayLiteral extends BaseParseNode {
205
+ readonly type: 'ArrayLiteral';
206
+ readonly ElementList: ElementList;
207
+ readonly hasTrailingComma: boolean;
208
+ }
209
+
210
+ // ElementList :
211
+ // Elision? AssignmentExpression
212
+ // Elision? SpreadElement
213
+ // ElementList `,` Elision? AssignmentExpression
214
+ // ElementList `,` Elision? SpreadElement
215
+ export type ElementList = readonly ElementListElement[];
216
+
217
+ // NON-SPEC
218
+ export type ElementListElement =
219
+ | AssignmentExpressionOrHigher
220
+ | SpreadElement
221
+ | Elision;
222
+
223
+ // Elision :
224
+ // `,`
225
+ // Elision `,`
226
+ export interface Elision extends BaseParseNode {
227
+ readonly type: 'Elision';
228
+ }
229
+
230
+ // SpreadElement :
231
+ // `...` AssignmentExpression
232
+ export interface SpreadElement extends BaseParseNode {
233
+ readonly type: 'SpreadElement';
234
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
235
+ }
236
+
237
+ // ObjectLiteral :
238
+ // `{` `}`
239
+ // `{` PropertyDefinitionList `}`
240
+ // `{` PropertyDefinitionList `,` `}`
241
+ export interface ObjectLiteral extends BaseParseNode {
242
+ readonly type: 'ObjectLiteral';
243
+ readonly PropertyDefinitionList: PropertyDefinitionList;
244
+ }
245
+
246
+ // PropertyDefinitionList :
247
+ // PropertyDefinition
248
+ // PropertyDefinitionList `,` PropertyDefinition
249
+ export type PropertyDefinitionList = readonly PropertyDefinitionLike[];
250
+
251
+ // PropertyDefinition :
252
+ // IdentifierReference
253
+ // CoverInitializedName
254
+ // PropertyName `:` AssignmentExpression
255
+ // MethodDefinition
256
+ // `...` AssignmentExpression
257
+ export type PropertyDefinitionLike =
258
+ | IdentifierReference
259
+ | CoverInitializedName
260
+ | PropertyDefinition
261
+ | MethodDefinitionLike;
262
+
263
+ // PropertyDefinition (partial) :
264
+ // PropertyName `:` AssignmentExpression
265
+ // `...` AssignmentExpression
266
+ export interface PropertyDefinition extends BaseParseNode {
267
+ readonly type: 'PropertyDefinition';
268
+ readonly PropertyName: PropertyNameLike | null;
269
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
270
+ }
271
+
272
+ // PropertyName :
273
+ // LiteralPropertyName
274
+ // ComputedPropertyName
275
+ //
276
+ // LiteralPropertyName :
277
+ // IdentifierName
278
+ // StringLiteral
279
+ // NumericLiteral
280
+ //
281
+ // ComputedPropertyName :
282
+ // `[` AssignmentExpression `]`
283
+ export type PropertyNameLike =
284
+ | PropertyName
285
+ | StringLiteral
286
+ | NumericLiteral
287
+ | IdentifierName;
288
+
289
+ // PropertyName (partial) :
290
+ // ComputedPropertyName
291
+ //
292
+ // ComputedPropertyName :
293
+ // `[` AssignmentExpression `]`
294
+ export interface PropertyName extends BaseParseNode {
295
+ readonly type: 'PropertyName';
296
+ readonly ComputedPropertyName: AssignmentExpressionOrHigher;
297
+ }
298
+
299
+ // CoverInitializedName :
300
+ // IdentifierReference Initializer
301
+ export interface CoverInitializedName extends BaseParseNode {
302
+ readonly type: 'CoverInitializedName';
303
+ readonly IdentifierReference: IdentifierReference;
304
+ readonly Initializer: Initializer | null;
305
+ }
306
+
307
+ // Initializer :
308
+ // `=` AssignmentExpression
309
+ export type Initializer = AssignmentExpressionOrHigher;
310
+
311
+ // TemplateLiteral :
312
+ // NoSubstitutionTemplate
313
+ // SubstitutionTemplate
314
+ //
315
+ // SubstitutionTemplate :
316
+ // TemplateHead Expression TemplateSpans
317
+ //
318
+ // TemplateSpans :
319
+ // TemplateTail
320
+ // TemplateMiddleList TemplateTail
321
+ //
322
+ // TemplateMiddleList :
323
+ // TemplateMiddle Expression
324
+ // TemplateMiddleList TemplateMiddle Expression
325
+ export interface TemplateLiteral extends BaseParseNode {
326
+ readonly type: 'TemplateLiteral';
327
+ readonly TemplateSpanList: readonly string[];
328
+ readonly ExpressionList: readonly Expression[];
329
+ }
330
+
331
+ // MemberExpression :
332
+ // PrimaryExpression
333
+ // MemberExpression `[` Expression `]`
334
+ // MemberExpression `.` IdentifierName
335
+ // MemberExpression TemplateLiteral
336
+ // SuperProperty
337
+ // MetaProperty
338
+ // `new` MemberExpression Arguments
339
+ // MemberExpression `.` PrivateIdentifier
340
+ export type MemberExpressionOrHigher =
341
+ | PrimaryExpression
342
+ | MemberExpression
343
+ | SuperProperty
344
+ | MetaProperty
345
+ | NewExpression;
346
+
347
+ // MemberExpression :
348
+ // MemberExpression `[` Expression `]`
349
+ // MemberExpression `.` IdentifierName
350
+ // MemberExpression `.` PrivateIdentifier
351
+ export interface MemberExpression extends BaseParseNode {
352
+ readonly type: 'MemberExpression';
353
+
354
+ /// MemberExpression : MemberExpression `[` Expression `]`
355
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
356
+ // readonly Expression: Expression | null;
357
+
358
+ /// MemberExpression : MemberExpression `.` IdentifierName
359
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
360
+ // readonly IdentifierName: IdentifierName | null;
361
+
362
+ /// MemberExpression : MemberExpression `.` PrivateIdentifier
363
+ // readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
364
+ // readonly PrivateIdentifier: PrivateIdentifier | null;
365
+
366
+ readonly MemberExpression: LeftHandSideExpression; // NOTE: Should be MemberExpressionOrHigher
367
+ readonly Expression: Expression | null;
368
+ readonly IdentifierName: IdentifierName | null;
369
+ readonly PrivateIdentifier: PrivateIdentifier | null;
370
+ }
371
+
372
+ // SuperProperty :
373
+ // super `[` Expression `]`
374
+ // super `.` IdentifierName
375
+ export interface SuperProperty extends BaseParseNode {
376
+ readonly type: 'SuperProperty';
377
+
378
+ /// SuperProperty : super `[` Expression `]`
379
+ // readonly Expression: Expression | null;
380
+
381
+ /// SuperProperty : super `.` IdentifierName
382
+ // readonly IdentifierName: IdentifierName | null;
383
+
384
+ readonly Expression: Expression | null;
385
+ readonly IdentifierName: IdentifierName | null;
386
+ }
387
+
388
+ // MetaProperty :
389
+ // NewTarget
390
+ // ImportMeta
391
+ export type MetaProperty =
392
+ | NewTarget
393
+ | ImportMeta;
394
+
395
+ // NewTarget :
396
+ // `new` `.` `target`
397
+ export interface NewTarget extends BaseParseNode {
398
+ readonly type: 'NewTarget';
399
+ }
400
+
401
+ // ImportMeta :
402
+ // `import` `.` `meta`
403
+ export interface ImportMeta extends BaseParseNode {
404
+ readonly type: 'ImportMeta';
405
+ }
406
+
407
+ // NewExpression :
408
+ // MemberExpression
409
+ // `new` NewExpression
410
+ export type NewExpressionOrHigher =
411
+ | MemberExpressionOrHigher
412
+ | NewExpression;
413
+
414
+ // NewExpression (partial) :
415
+ // `new` NewExpression
416
+ //
417
+ // MemberExpression (partial) :
418
+ // `new` MemberExpression Arguments
419
+ export interface NewExpression extends BaseParseNode {
420
+ readonly type: 'NewExpression';
421
+ // NOTE: Should be NewExpressionOrHigher | MemberExpressionOrHigher
422
+ readonly MemberExpression: LeftHandSideExpression;
423
+ readonly Arguments: Arguments | null;
424
+ }
425
+
426
+ // CallExpression :
427
+ // CoverCallExpressionAndAsyncArrowHead
428
+ // SuperCall
429
+ // ImportCall
430
+ // CallExpression Arguments
431
+ // CallExpression `[` Expression `]`
432
+ // CallExpression `.` IdentifierName
433
+ // CallExpression TemplateLiteral
434
+ // CallExpression `.` PrivateIdentifier
435
+ export type CallExpressionOrHigher =
436
+ // CoverCallExpressionAndAsyncArrowHead
437
+ | SuperCall
438
+ | ImportCall
439
+ | CallExpression
440
+ | MemberExpression
441
+ | TaggedTemplateExpression;
442
+
443
+ // CallExpression (partial) :
444
+ // CoverCallExpressionAndAsyncArrowHead
445
+ // CallExpression Arguments
446
+ //
447
+ // CallMemberExpression (refined) :
448
+ // MemberExpression Arguments
449
+ export interface CallExpression extends BaseParseNode {
450
+ readonly type: 'CallExpression';
451
+ readonly CallExpression: CallExpressionOrHigher | MemberExpressionOrHigher;
452
+ readonly Arguments: Arguments;
453
+ // NON-SPEC
454
+ readonly arrowInfo?: ArrowInfo;
455
+ }
456
+
457
+ // CallExpression (partial) :
458
+ // CallExpression TemplateLiteral
459
+ //
460
+ // MemberExpression (partial) :
461
+ // MemberExpression TemplateLiteral
462
+ export interface TaggedTemplateExpression extends BaseParseNode {
463
+ readonly type: 'TaggedTemplateExpression';
464
+ readonly MemberExpression: CallExpressionOrHigher | MemberExpressionOrHigher;
465
+ readonly TemplateLiteral: TemplateLiteral;
466
+ // NON-SPEC
467
+ readonly arrowInfo?: ArrowInfo;
468
+ }
469
+
470
+ // SuperCall :
471
+ // `super` Arguments
472
+ export interface SuperCall extends BaseParseNode {
473
+ readonly type: 'SuperCall';
474
+ readonly Arguments: Arguments;
475
+ }
476
+
477
+ // ImportCall :
478
+ // `import` `(` AssignmentExpression `,`? `)`
479
+ // `import` `(` AssignmentExpression `,` AssignmentExpression `,`? `)`
480
+ export interface ImportCall extends BaseParseNode {
481
+ readonly type: 'ImportCall';
482
+ readonly Phase: 'defer' | 'evaluation';
483
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
484
+ readonly OptionsExpression?: AssignmentExpressionOrHigher;
485
+ }
486
+
487
+ // Arguments :
488
+ // `(` `)`
489
+ // `(` ArgumentList `)`
490
+ // `(` ArgumentList `,` `)`
491
+ //
492
+ // ArgumentList :
493
+ // AssignmentExpression
494
+ // `...` AssignmentExpression
495
+ // ArgumentList `,` AssignmentExpression
496
+ // ArgumentList `,` `...` AssignmentExpression
497
+ export type Arguments = readonly ArgumentListElement[];
498
+
499
+ // NON-SPEC
500
+ export type ArgumentListElement =
501
+ | AssignmentExpressionOrHigher
502
+ | AssignmentRestElement;
503
+
504
+ // OptionalExpression :
505
+ // MemberExpression OptionalChain
506
+ // CallExpression OptionalChain
507
+ // OptionalExpression OptionalChain
508
+ export interface OptionalExpression extends BaseParseNode {
509
+ readonly type: 'OptionalExpression';
510
+ // NOTE: The following doesn't match how this is handled in other nodes.
511
+ readonly MemberExpression: MemberExpressionOrHigher | CallExpressionOrHigher | OptionalExpression;
512
+ readonly OptionalChain: OptionalChain;
513
+ }
514
+
515
+ // OptionalChain :
516
+ // `?.` Arguments
517
+ // `?.` `[` Expression `]`
518
+ // `?.` IdentifierName
519
+ // `?.` PrivateIdentifier
520
+ // OptionalChain `?.` Arguments
521
+ // OptionalChain `?.` `[` Expression `]`
522
+ // OptionalChain `?.` IdentifierName
523
+ // OptionalChain `?.` PrivateIdentifier
524
+ export interface OptionalChain extends BaseParseNode {
525
+ readonly type: 'OptionalChain';
526
+
527
+ /// OptionalChain : `?.` Arguments
528
+ // readonly Arguments?: Arguments;
529
+
530
+ /// OptionalChain : `?.` `[` Expression `]`
531
+ // readonly Expression?: Expression;
532
+
533
+ /// OptionalChain : `?.` IdentifierName
534
+ // readonly IdentifierName?: IdentifierName;
535
+
536
+ /// OptionalChain : `?.` PrivateIdentifier
537
+ // readonly PrivateIdentifier?: PrivateIdentifier;
538
+
539
+ /// OptionalChain : OptionalChain `?.` Arguments
540
+ // readonly OptionalChain: OptionalChain | null;
541
+ // readonly Arguments?: Arguments;
542
+
543
+ /// OptionalChain : OptionalChain `?.` `[` Expression `]`
544
+ // readonly OptionalChain: OptionalChain | null;
545
+ // readonly Expression?: Expression;
546
+
547
+ /// OptionalChain : OptionalChain `?.` IdentifierName
548
+ // readonly OptionalChain: OptionalChain | null;
549
+ // readonly IdentifierName?: IdentifierName;
550
+
551
+ /// OptionalChain : OptionalChain `?.` PrivateIdentifier
552
+ // readonly OptionalChain: OptionalChain | null;
553
+ // readonly PrivateIdentifier?: PrivateIdentifier;
554
+
555
+ readonly OptionalChain: OptionalChain | null;
556
+ readonly Arguments?: Arguments;
557
+ readonly Expression?: Expression;
558
+ readonly IdentifierName?: IdentifierName;
559
+ readonly PrivateIdentifier?: PrivateIdentifier;
560
+ }
561
+
562
+ // LeftHandSideExpression :
563
+ // NewExpression
564
+ // CallExpression
565
+ // OptionalExpression
566
+ export type LeftHandSideExpression =
567
+ | NewExpressionOrHigher
568
+ | CallExpressionOrHigher
569
+ | OptionalExpression;
570
+
571
+ // UpdateExpression :
572
+ // LeftHandSideExpression
573
+ // LeftHandSideExpression [no LineTerminator here] `++`
574
+ // LeftHandSideExpression [no LineTerminator here] `--`
575
+ // `++` UnaryExpression
576
+ // `--` UnaryExpression
577
+ export type UpdateExpressionOrHigher =
578
+ | LeftHandSideExpression
579
+ | UpdateExpression;
580
+
581
+ // UpdateExpression (partial) :
582
+ // LeftHandSideExpression [no LineTerminator here] `++`
583
+ // LeftHandSideExpression [no LineTerminator here] `--`
584
+ // `++` UnaryExpression
585
+ // `--` UnaryExpression
586
+ export interface UpdateExpression extends BaseParseNode {
587
+ readonly type: 'UpdateExpression';
588
+
589
+ /// UpdateExpression :
590
+ /// LeftHandSideExpression [no LineTerminator here] `++`
591
+ /// LeftHandSideExpression [no LineTerminator here] `--`
592
+ // readonly LeftHandSideExpression: LeftHandSideExpression | null;
593
+ // readonly operator: '++' | '--';
594
+
595
+ /// UpdateExpression :
596
+ /// `++` UnaryExpression
597
+ /// `--` UnaryExpression
598
+ // readonly operator: '++' | '--';
599
+ // readonly UnaryExpression: UnaryExpressionOrHigher | null;
600
+
601
+ readonly operator: '++' | '--';
602
+ readonly LeftHandSideExpression: LeftHandSideExpression | null;
603
+ readonly UnaryExpression: UnaryExpressionOrHigher | null;
604
+ }
605
+
606
+ // UnaryExpression :
607
+ // UpdateExpression
608
+ // `delete` UnaryExpression
609
+ // `void` UnaryExpression
610
+ // `typeof` UnaryExpression
611
+ // `+` UnaryExpression
612
+ // `-` UnaryExpression
613
+ // `~` UnaryExpression
614
+ // `!` UnaryExpression
615
+ // [+Await] AwaitExpression
616
+ export type UnaryExpressionOrHigher =
617
+ | UpdateExpressionOrHigher
618
+ | UnaryExpression
619
+ | AwaitExpression;
620
+
621
+ // UnaryExpression (partial) :
622
+ // `delete` UnaryExpression
623
+ // `void` UnaryExpression
624
+ // `typeof` UnaryExpression
625
+ // `+` UnaryExpression
626
+ // `-` UnaryExpression
627
+ // `~` UnaryExpression
628
+ // `!` UnaryExpression
629
+ export interface UnaryExpression extends BaseParseNode {
630
+ readonly type: 'UnaryExpression';
631
+ readonly operator: 'delete' | 'void' | 'typeof' | '+' | '-' | '~' | '!';
632
+ readonly UnaryExpression: UnaryExpressionOrHigher;
633
+ }
634
+
635
+ // ExponentiationExpression :
636
+ // UnaryExpression
637
+ // UpdateExpresion `**` ExponentiationExpression
638
+ export type ExponentiationExpressionOrHigher =
639
+ | UnaryExpressionOrHigher
640
+ | ExponentiationExpression;
641
+
642
+ // ExponentiationExpression (partial) :
643
+ // UpdateExpresion `**` ExponentiationExpression
644
+ export interface ExponentiationExpression extends BaseParseNode {
645
+ readonly type: 'ExponentiationExpression';
646
+ readonly UpdateExpression: UpdateExpressionOrHigher;
647
+ readonly ExponentiationExpression: ExponentiationExpressionOrHigher;
648
+ }
649
+
650
+ // MultiplicativeExpression :
651
+ // ExponentiationExpression
652
+ // MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
653
+ export type MultiplicativeExpressionOrHigher =
654
+ | ExponentiationExpressionOrHigher
655
+ | MultiplicativeExpression;
656
+
657
+ // MultiplicativeExpression (partial) :
658
+ // MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
659
+ export interface MultiplicativeExpression extends BaseParseNode {
660
+ readonly type: 'MultiplicativeExpression';
661
+ readonly MultiplicativeExpression: MultiplicativeExpressionOrHigher;
662
+ readonly MultiplicativeOperator: MultiplicativeOperator;
663
+ readonly ExponentiationExpression: ExponentiationExpressionOrHigher;
664
+ }
665
+
666
+ // MultiplicativeOperator : one of
667
+ // `*` `/` `%`;
668
+ export type MultiplicativeOperator = '*' | '/' | '%';
669
+
670
+ // AdditiveExpression :
671
+ // MultiplicativeExpression
672
+ // AdditiveExpression `+` MultiplicativeExpression
673
+ // AdditiveExpression `-` MultiplicativeExpression
674
+ export type AdditiveExpressionOrHigher =
675
+ | MultiplicativeExpressionOrHigher
676
+ | AdditiveExpression;
677
+
678
+ // AdditiveExpression (partial) :
679
+ // AdditiveExpression `+` MultiplicativeExpression
680
+ // AdditiveExpression `-` MultiplicativeExpression
681
+ export interface AdditiveExpression extends BaseParseNode {
682
+ readonly type: 'AdditiveExpression';
683
+ readonly operator: '+' | '-';
684
+ readonly AdditiveExpression: AdditiveExpressionOrHigher;
685
+ readonly MultiplicativeExpression: MultiplicativeExpressionOrHigher;
686
+ }
687
+
688
+ // ShiftExpression :
689
+ // AdditiveExpression
690
+ // ShiftExpression `<<` AdditiveExpression
691
+ // ShiftExpression `>>` AdditiveExpression
692
+ // ShiftExpression `>>>` AdditiveExpression
693
+ export type ShiftExpressionOrHigher =
694
+ | AdditiveExpressionOrHigher
695
+ | ShiftExpression;
696
+
697
+ // ShiftExpression (partial) :
698
+ // ShiftExpression `<<` AdditiveExpression
699
+ // ShiftExpression `>>` AdditiveExpression
700
+ // ShiftExpression `>>>` AdditiveExpression
701
+ export interface ShiftExpression extends BaseParseNode {
702
+ readonly type: 'ShiftExpression';
703
+ readonly operator: '<<' | '>>' | '>>>';
704
+ readonly ShiftExpression: ShiftExpressionOrHigher;
705
+ readonly AdditiveExpression: AdditiveExpressionOrHigher;
706
+ }
707
+
708
+ // RelationalExpression :
709
+ // ShiftExpression
710
+ // RelationalExpression `<` ShiftExpression
711
+ // RelationalExpression `>` ShiftExpression
712
+ // RelationalExpression `<=` ShiftExpression
713
+ // RelationalExpression `>=` ShiftExpression
714
+ // RelationalExpression `instanceof` ShiftExpression
715
+ // RelationalExpression `in` ShiftExpression
716
+ export type RelationalExpressionOrHigher =
717
+ | ShiftExpressionOrHigher
718
+ | RelationalExpression;
719
+
720
+ // RelationalExpression (partial) :
721
+ // RelationalExpression `<` ShiftExpression
722
+ // RelationalExpression `>` ShiftExpression
723
+ // RelationalExpression `<=` ShiftExpression
724
+ // RelationalExpression `>=` ShiftExpression
725
+ // RelationalExpression `instanceof` ShiftExpression
726
+ // RelationalExpression `in` ShiftExpression
727
+ // PrivateIdentifier `in` ShiftExpression
728
+ export interface RelationalExpression extends BaseParseNode {
729
+ readonly type: 'RelationalExpression';
730
+ readonly operator: '<' | '>' | '<=' | '>=' | 'instanceof' | 'in';
731
+ readonly PrivateIdentifier?: PrivateIdentifier;
732
+ readonly RelationalExpression?: RelationalExpressionOrHigher;
733
+ readonly ShiftExpression: ShiftExpressionOrHigher;
734
+ }
735
+
736
+ // EqualityExpression :
737
+ // RelationalExpression
738
+ // EqualityExpression == RelationalExpression
739
+ // EqualityExpression != RelationalExpression
740
+ // EqualityExpression === RelationalExpression
741
+ // EqualityExpression !== RelationalExpression
742
+ export type EqualityExpressionOrHigher =
743
+ | RelationalExpressionOrHigher
744
+ | EqualityExpression;
745
+
746
+ // EqualityExpression (partial) :
747
+ // EqualityExpression == RelationalExpression
748
+ // EqualityExpression != RelationalExpression
749
+ // EqualityExpression === RelationalExpression
750
+ // EqualityExpression !== RelationalExpression
751
+ export interface EqualityExpression extends BaseParseNode {
752
+ readonly type: 'EqualityExpression';
753
+ readonly operator: '==' | '!=' | '===' | '!==';
754
+ readonly EqualityExpression: EqualityExpressionOrHigher;
755
+ readonly RelationalExpression: RelationalExpressionOrHigher;
756
+ }
757
+
758
+ // BitwiseANDExpression :
759
+ // EqualityExpression
760
+ // BitwiseANDExpression `^&` EqualityExpression
761
+ export type BitwiseANDExpressionOrHigher =
762
+ | EqualityExpressionOrHigher
763
+ | BitwiseANDExpression;
764
+
765
+ // BitwiseANDExpression (partial) :
766
+ // BitwiseANDExpression `^&` EqualityExpression
767
+ export interface BitwiseANDExpression extends BaseParseNode {
768
+ readonly type: 'BitwiseANDExpression';
769
+ readonly operator: '&';
770
+ readonly A: BitwiseANDExpressionOrHigher;
771
+ readonly B: EqualityExpressionOrHigher;
772
+ }
773
+
774
+ // BitwiseXORExpression :
775
+ // BitwiseANDExpression
776
+ // BitwiseXORExpression `^` BitwiseANDExpression
777
+ export type BitwiseXORExpressionOrHigher =
778
+ | BitwiseANDExpressionOrHigher
779
+ | BitwiseXORExpression;
780
+
781
+ // BitwiseXORExpression (partial) :
782
+ // BitwiseXORExpression `^` BitwiseANDExpression
783
+ export interface BitwiseXORExpression extends BaseParseNode {
784
+ readonly type: 'BitwiseXORExpression';
785
+ readonly operator: '^';
786
+ readonly A: BitwiseXORExpressionOrHigher;
787
+ readonly B: BitwiseANDExpressionOrHigher;
788
+ }
789
+
790
+ // BitwiseORExpression :
791
+ // BitwiseXORExpression
792
+ // BitwiseORExpression `|` BitwiseXORExpression
793
+ export type BitwiseORExpressionOrHigher =
794
+ | BitwiseXORExpressionOrHigher
795
+ | BitwiseORExpression;
796
+
797
+ // BitwiseORExpression (partial) :
798
+ // BitwiseORExpression `|` BitwiseXORExpression
799
+ export interface BitwiseORExpression extends BaseParseNode {
800
+ readonly type: 'BitwiseORExpression';
801
+ readonly operator: '|';
802
+ readonly A: BitwiseORExpressionOrHigher;
803
+ readonly B: BitwiseXORExpressionOrHigher;
804
+ }
805
+
806
+ // LogicalANDExpression :
807
+ // BitwiseORExpression
808
+ // LogicalANDExpression `&&` BitwiseORExpression
809
+ export type LogicalANDExpressionOrHigher =
810
+ | BitwiseORExpressionOrHigher
811
+ | LogicalANDExpression;
812
+
813
+ // LogicalANDExpression (partial) :
814
+ // LogicalANDExpression `&&` BitwiseORExpression
815
+ export interface LogicalANDExpression extends BaseParseNode {
816
+ readonly type: 'LogicalANDExpression';
817
+ readonly LogicalANDExpression: LogicalANDExpressionOrHigher;
818
+ readonly BitwiseORExpression: BitwiseORExpressionOrHigher;
819
+ }
820
+
821
+ // LogicalORExpression :
822
+ // LogicalANDExpression
823
+ // LogicalORExpression `||` LogicalANDExpression
824
+ export type LogicalORExpressionOrHigher =
825
+ | LogicalANDExpressionOrHigher
826
+ | LogicalORExpression;
827
+
828
+ // LogicalORExpression (partial) :
829
+ // LogicalORExpression `||` LogicalANDExpression
830
+ export interface LogicalORExpression extends BaseParseNode {
831
+ readonly type: 'LogicalORExpression';
832
+ readonly LogicalORExpression: LogicalORExpressionOrHigher;
833
+ readonly LogicalANDExpression: LogicalANDExpressionOrHigher;
834
+ }
835
+
836
+ // CoalesceExpression :
837
+ // CoalesceExpressionHead `??` BitwiseORExpression
838
+ export interface CoalesceExpression extends BaseParseNode {
839
+ readonly type: 'CoalesceExpression';
840
+ readonly CoalesceExpressionHead: CoalesceExpressionHead;
841
+ readonly BitwiseORExpression: BitwiseORExpressionOrHigher;
842
+ }
843
+
844
+ // CoalesceExpressionHead :
845
+ // CoalesceExpression
846
+ // BitwiseORExpression
847
+ export type CoalesceExpressionHead =
848
+ | BitwiseORExpressionOrHigher
849
+ | CoalesceExpression;
850
+
851
+ // ShortCircuitExpression :
852
+ // LogicalORExpression
853
+ // CoalesceExpression
854
+ export type ShortCircuitExpressionOrHigher =
855
+ | LogicalORExpressionOrHigher
856
+ | CoalesceExpression;
857
+
858
+ // ConditionalExpression :
859
+ // ShortCircuitExpression
860
+ // ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
861
+ export type ConditionalExpressionOrHigher =
862
+ | ShortCircuitExpressionOrHigher
863
+ | ConditionalExpression;
864
+
865
+ // ConditionalExpression (partial) :
866
+ // ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
867
+ export interface ConditionalExpression extends BaseParseNode {
868
+ readonly type: 'ConditionalExpression';
869
+ readonly ShortCircuitExpression: ShortCircuitExpressionOrHigher;
870
+ readonly AssignmentExpression_a: AssignmentExpressionOrHigher;
871
+ readonly AssignmentExpression_b: AssignmentExpressionOrHigher;
872
+ }
873
+
874
+ // AssignmentExpression :
875
+ // ConditionalExpression
876
+ // [+Yield] YieldExpression
877
+ // ArrowFunction
878
+ // AsyncArrowFunction
879
+ // LeftHandSideExpression `=` AssignmentExpression
880
+ // LeftHandSideExpression AssignmentOperator AssignmentExpression
881
+ // LeftHandSideExpression LogicalAssignmentOperator AssignmentExpression
882
+ export type AssignmentExpressionOrHigher =
883
+ | ConditionalExpressionOrHigher
884
+ | YieldExpression
885
+ | ArrowFunction
886
+ | AsyncArrowFunction
887
+ | AssignmentExpression;
888
+
889
+ // AssignmentExpression (partial) :
890
+ // LeftHandSideExpression `=` AssignmentExpression
891
+ // LeftHandSideExpression AssignmentOperator AssignmentExpression
892
+ // LeftHandSideExpression LogicalAssignmentOperator AssignmentExpression
893
+ //
894
+ export interface AssignmentExpression extends BaseParseNode {
895
+ readonly type: 'AssignmentExpression';
896
+ // NOTE: Should be LeftHandSideExpression, but some invalid nodes are allowed as they report early errors
897
+ readonly LeftHandSideExpression: AssignmentExpressionOrHigher;
898
+ readonly AssignmentOperator: '=' | AssignmentOperator | '&&=' | '||=' | '??=';
899
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
900
+ }
901
+
902
+ // AssignmentOperator : one of
903
+ // `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=`
904
+ export type AssignmentOperator = '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' | '**=';
905
+
906
+ // AssignmentRestElement :
907
+ // `...` DestructuringAssignmentTarget
908
+ //
909
+ // ArgumentList (partial) :
910
+ // `...` AssignmentExpression
911
+ // ArgumentList `,` `...` AssignmentExpression
912
+ export interface AssignmentRestElement extends BaseParseNode {
913
+ readonly type: 'AssignmentRestElement';
914
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
915
+ }
916
+
917
+ // NON-SPEC
918
+ export type BinaryExpressionOrHigher =
919
+ | BinaryExpression
920
+ | UnaryExpressionOrHigher;
921
+
922
+ // NON-SPEC
923
+ export type BinaryExpression =
924
+ | AssignmentExpression
925
+ | LogicalORExpression
926
+ | LogicalANDExpression
927
+ | BitwiseORExpression
928
+ | BitwiseXORExpression
929
+ | BitwiseANDExpression
930
+ | RelationalExpression
931
+ | EqualityExpression
932
+ | ShiftExpression
933
+ | AdditiveExpression
934
+ | MultiplicativeExpression
935
+ | ExponentiationExpression;
936
+
937
+ // Expression :
938
+ // AssignmentExpression
939
+ // Expression `,` AssignmentExpression
940
+ export type Expression =
941
+ | CommaOperator
942
+ | AssignmentExpressionOrHigher;
943
+
944
+ // Expression (partial) :
945
+ // Expression `,` AssignmentExpression
946
+ export interface CommaOperator extends BaseParseNode {
947
+ readonly type: 'CommaOperator';
948
+ readonly ExpressionList: readonly AssignmentExpressionOrHigher[];
949
+ }
950
+
951
+ // A.3 Statements
952
+ // https://tc39.es/ecma262/#sec-statements
953
+
954
+ // Statement :
955
+ // BlockStatement
956
+ // VariableStatement
957
+ // EmptyStatement
958
+ // ExpressionStatement
959
+ // IfStatement
960
+ // BreakableStatement
961
+ // ContinueStatement
962
+ // BreakStatement
963
+ // [+Return] ReturnStatement
964
+ // WithStatement
965
+ // LabelledStatement
966
+ // ThrowStatement
967
+ // TryStatement
968
+ // DebuggerStatement
969
+ export type Statement =
970
+ | BlockStatement
971
+ | VariableStatement
972
+ | EmptyStatement
973
+ | ExpressionStatement
974
+ | IfStatement
975
+ | BreakableStatement
976
+ | ContinueStatement
977
+ | BreakStatement
978
+ | ReturnStatement
979
+ | WithStatement
980
+ | LabelledStatement
981
+ | ThrowStatement
982
+ | TryStatement
983
+ | DebuggerStatement;
984
+
985
+ // Declaration :
986
+ // HoistableDeclaration
987
+ // ClassDeclaration
988
+ // LexicalDeclarationLike
989
+ export type Declaration =
990
+ | HoistableDeclaration
991
+ | ClassDeclaration
992
+ | LexicalDeclarationLike;
993
+
994
+ // HoistableDeclaration
995
+ // FunctionDeclaration
996
+ // GeneratorDeclaration
997
+ // AsyncFunctionDeclaration
998
+ // AsyncGeneratorDeclaration
999
+ export type HoistableDeclaration =
1000
+ | FunctionDeclaration
1001
+ | GeneratorDeclaration
1002
+ | AsyncFunctionDeclaration
1003
+ | AsyncGeneratorDeclaration;
1004
+
1005
+ // BreakableStatement :
1006
+ // IterationStatement
1007
+ // SwitchStatement
1008
+ export type BreakableStatement =
1009
+ | IterationStatement
1010
+ | SwitchStatement;
1011
+
1012
+ // BlockStatement :
1013
+ // Block
1014
+ export type BlockStatement =
1015
+ | Block;
1016
+
1017
+ // Block :
1018
+ // `{` StatementList `}`
1019
+ export interface Block extends BaseParseNode {
1020
+ readonly type: 'Block';
1021
+ readonly StatementList: StatementList;
1022
+ }
1023
+
1024
+ // StatementList :
1025
+ // StatementListItem
1026
+ // StatementList StatementListItem
1027
+ export type StatementList = readonly StatementListItem[];
1028
+
1029
+ // StatementListItem :
1030
+ // Statement
1031
+ // Declaration
1032
+ export type StatementListItem =
1033
+ | Statement
1034
+ | Declaration;
1035
+
1036
+ // LexicalDeclaration :
1037
+ // LetOrConst BindingList `;`
1038
+ export type LexicalDeclarationLike =
1039
+ | LexicalDeclaration;
1040
+
1041
+ // LexicalDeclaration :
1042
+ // LetOrConst BindingList `;`
1043
+ export interface LexicalDeclaration extends BaseParseNode {
1044
+ readonly type: 'LexicalDeclaration';
1045
+ readonly LetOrConst: LetOrConst;
1046
+ readonly BindingList: BindingList;
1047
+ }
1048
+
1049
+ // LetOrConst :
1050
+ // `let`
1051
+ // `const`
1052
+ export type LetOrConst =
1053
+ | 'let'
1054
+ | 'const';
1055
+
1056
+ // BindingList :
1057
+ // LexicalBinding
1058
+ // BindingList `,` LexicalBinding
1059
+ export type BindingList = readonly LexicalBinding[];
1060
+
1061
+ // LexicalBinding :
1062
+ // BindingIdentifier Initializer?
1063
+ // BindingPattern Initializer
1064
+ export interface LexicalBinding extends BaseParseNode {
1065
+ readonly type: 'LexicalBinding';
1066
+
1067
+ // LexicalBinding : BindingIdentifier Initializer?
1068
+ readonly BindingIdentifier?: BindingIdentifier;
1069
+
1070
+ // LexicalBinding : BindingPattern Initializer
1071
+ readonly BindingPattern?: BindingPattern;
1072
+
1073
+ readonly Initializer: Initializer | null;
1074
+ }
1075
+
1076
+ // VariableStatement :
1077
+ // `var` VariableDeclarationList `;`
1078
+ export interface VariableStatement extends BaseParseNode {
1079
+ readonly type: 'VariableStatement';
1080
+ readonly VariableDeclarationList: VariableDeclarationList;
1081
+ }
1082
+
1083
+ // VariableDeclarationList :
1084
+ // VariableDeclaration
1085
+ // VariableDeclarationList `,` VariableDeclaration
1086
+ export type VariableDeclarationList = readonly VariableDeclaration[];
1087
+
1088
+ // VariableDeclaration :
1089
+ // BindingIdentifier Initializer?
1090
+ // BindingPattern Initializer
1091
+ export interface VariableDeclaration extends BaseParseNode {
1092
+ readonly type: 'VariableDeclaration';
1093
+ readonly BindingPattern?: BindingPattern;
1094
+ readonly BindingIdentifier?: BindingIdentifier;
1095
+ readonly Initializer: Initializer | null;
1096
+ }
1097
+
1098
+ // BindingPattern :
1099
+ // ObjectBindingPattern
1100
+ // ArrayBindingPattern
1101
+ export type BindingPattern =
1102
+ | ObjectBindingPattern
1103
+ | ArrayBindingPattern;
1104
+
1105
+ // ObjectBindingPattern :
1106
+ // `{` `}`
1107
+ // `{` BindingRestProperty `}`
1108
+ // `{` BindingPropertyList `}`
1109
+ // `{` BindingPropertyList `,` BindingRestProperty? `}`
1110
+ export interface ObjectBindingPattern extends BaseParseNode {
1111
+ readonly type: 'ObjectBindingPattern';
1112
+ readonly BindingPropertyList: BindingPropertyList;
1113
+ readonly BindingRestProperty?: BindingRestProperty;
1114
+ }
1115
+
1116
+ // ArrayBindingPattern :
1117
+ // `[` Elision? BindingRestElement `]`
1118
+ // `[` BindingElementList `]`
1119
+ // `[` BindingElementList `,` Elision? BindingRestElement `]`
1120
+ export interface ArrayBindingPattern extends BaseParseNode {
1121
+ readonly type: 'ArrayBindingPattern';
1122
+ readonly BindingElementList: BindingElementList;
1123
+ readonly BindingRestElement: BindingRestElement;
1124
+ }
1125
+
1126
+ // BindingRestProperty :
1127
+ // `...` BindingIdentifier
1128
+ export interface BindingRestProperty extends BaseParseNode {
1129
+ readonly type: 'BindingRestProperty';
1130
+ readonly BindingIdentifier: BindingIdentifier;
1131
+ }
1132
+
1133
+ // BindingPropertyList :
1134
+ // BindingProperty
1135
+ // BindingPropertyList BindingProperty
1136
+ export type BindingPropertyList = readonly BindingPropertyLike[];
1137
+
1138
+ // BindingElementList :
1139
+ // BindingElisionElement
1140
+ // BindingElementList `,` BindingElisionElement
1141
+ export type BindingElementList = readonly BindingElisionElement[];
1142
+
1143
+ // BindingElisionElement :
1144
+ // Elision? BindingElement
1145
+ export type BindingElisionElement =
1146
+ | BindingElementLike
1147
+ | Elision;
1148
+
1149
+ // BindingProperty :
1150
+ // SingleNameBinding
1151
+ // PropertyName `:` BindingElement
1152
+ export type BindingPropertyLike =
1153
+ | BindingProperty
1154
+ | SingleNameBinding;
1155
+
1156
+ // BindingProperty :
1157
+ // PropertyName `:` BindingElement
1158
+ export interface BindingProperty extends BaseParseNode {
1159
+ readonly type: 'BindingProperty';
1160
+ readonly PropertyName: PropertyNameLike;
1161
+ readonly BindingElement: BindingElementLike;
1162
+ }
1163
+
1164
+ // BindingElement :
1165
+ // SingleNameBinding
1166
+ // BindingPattern Initializer?
1167
+ export type BindingElementLike =
1168
+ | BindingElement
1169
+ | SingleNameBinding;
1170
+
1171
+ // BindingElement (partial) :
1172
+ // BindingPattern Initializer?
1173
+ export interface BindingElement extends BaseParseNode {
1174
+ readonly type: 'BindingElement';
1175
+ readonly BindingPattern: BindingPattern;
1176
+ readonly Initializer: Initializer | null;
1177
+ }
1178
+
1179
+ // SingleNameBinding :
1180
+ // BindingIdentifier Initializer?
1181
+ export interface SingleNameBinding extends BaseParseNode {
1182
+ readonly type: 'SingleNameBinding';
1183
+ readonly BindingIdentifier: BindingIdentifier;
1184
+ readonly Initializer: Initializer | null;
1185
+ }
1186
+
1187
+ // BindingRestElement :
1188
+ // `...` BindingIdentifier
1189
+ // `...` BindingPattern
1190
+ export interface BindingRestElement extends BaseParseNode {
1191
+ readonly type: 'BindingRestElement';
1192
+ readonly BindingIdentifier?: BindingIdentifier;
1193
+ readonly BindingPattern?: BindingPattern;
1194
+ }
1195
+
1196
+ // EmptyStatement :
1197
+ // `;`
1198
+ export interface EmptyStatement extends BaseParseNode {
1199
+ readonly type: 'EmptyStatement';
1200
+ }
1201
+
1202
+ // ExpressionStatement :
1203
+ // [lookahead != `{`, `function`, `async` [no LineTerminator here] `function`, `class`, `let` `[` ] Expression `;`
1204
+ export interface ExpressionStatement extends BaseParseNode {
1205
+ readonly type: 'ExpressionStatement';
1206
+ readonly Expression: Expression;
1207
+ }
1208
+
1209
+ // IfStatement :
1210
+ // `if` `(` Expression `)` Statement `else` Statement
1211
+ // `if` `(` Expression `)` Statement [lookahead ≠ `else`]
1212
+ export interface IfStatement extends BaseParseNode {
1213
+ readonly type: 'IfStatement';
1214
+ readonly Expression: Expression;
1215
+ readonly Statement_a: Statement;
1216
+ readonly Statement_b: Statement;
1217
+ }
1218
+
1219
+ // IterationStatement :
1220
+ // DoWhileStatement
1221
+ // WhileStatement
1222
+ // ForStatement
1223
+ // ForInOfStatement
1224
+ export type IterationStatement =
1225
+ | DoWhileStatement
1226
+ | WhileStatement
1227
+ | ForStatement
1228
+ | ForInOfStatement;
1229
+
1230
+ // DoWhileStatement :
1231
+ // `do` Statement `while` `(` Expression `)` `;`
1232
+ export interface DoWhileStatement extends BaseParseNode {
1233
+ readonly type: 'DoWhileStatement';
1234
+ readonly Statement: Statement;
1235
+ readonly Expression: Expression;
1236
+ }
1237
+
1238
+ // WhileStatement :
1239
+ // `while` `(` Expression `)` Statement
1240
+ export interface WhileStatement extends BaseParseNode {
1241
+ readonly type: 'WhileStatement';
1242
+ readonly Expression: Expression;
1243
+ readonly Statement: Statement;
1244
+ }
1245
+
1246
+ // ForStatement :
1247
+ // `for` `(` [lookahead != `let` `[`] Expression? `;` Expression? `;` Expression? `)` Statement
1248
+ // `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
1249
+ // `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
1250
+ export interface ForStatement extends BaseParseNode {
1251
+ readonly type: 'ForStatement';
1252
+
1253
+ /// ForStatement : `for` `(` [lookahead != `let` `[`] Expression? `;` Expression? `;` Expression? `)` Statement
1254
+ // Expression_a?: Expression;
1255
+ // Expression_b?: Expression;
1256
+ // Expression_c?: Expression;
1257
+ // Statement: Statement;
1258
+
1259
+ /// ForStatement : `for` `(` `var` VariableDeclarationList `;` Expression? `;` Expression? `)` Statement
1260
+ // VariableDeclarationList: VariableDeclarationList;
1261
+ // Expression_a?: Expression;
1262
+ // Expression_b?: Expression;
1263
+ // Statement: Statement;
1264
+
1265
+ /// ForStatement : `for` `(` LexicalDeclaration Expression? `;` Expression? `)` Statement
1266
+ // LexicalDeclaration?: LexicalDeclarationLike;
1267
+ // Expression_a?: Expression;
1268
+ // Expression_b?: Expression;
1269
+ // Statement: Statement;
1270
+
1271
+ readonly VariableDeclarationList: VariableDeclarationList;
1272
+ readonly LexicalDeclaration?: LexicalDeclarationLike;
1273
+ readonly Expression_a?: Expression;
1274
+ readonly Expression_b?: Expression;
1275
+ readonly Expression_c?: Expression;
1276
+ readonly Statement: Statement;
1277
+ }
1278
+
1279
+ // ForInOfStatement :
1280
+ // `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1281
+ // `for` `(` `var` ForBinding `in` Expression `)` Statement
1282
+ // `for` `(` ForDeclaration `in` Expression `)` Statement
1283
+ // `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1284
+ // `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1285
+ // `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1286
+ // `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1287
+ // `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1288
+ // `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1289
+ export type ForInOfStatement =
1290
+ | ForInStatement
1291
+ | ForOfStatement
1292
+ | ForAwaitStatement;
1293
+
1294
+ // ForInOfStatement (partial) :
1295
+ // `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1296
+ // `for` `(` `var` ForBinding `in` Expression `)` Statement
1297
+ // `for` `(` ForDeclaration `in` Expression `)` Statement
1298
+ export interface ForInStatement extends BaseParseNode {
1299
+ readonly type: 'ForInStatement';
1300
+
1301
+ /// ForInStatement : `for` `(` [lookahead != `let` `[`] LeftHandSideExpression `in` Expression `)` Statement
1302
+ // LeftHandSideExpression?: LeftHandSideExpression;
1303
+ // Expression: Expression;
1304
+ // Statement: Statement;
1305
+
1306
+ /// ForInStatement : `for` `(` `var` ForBinding `in` Expression `)` Statement
1307
+ // ForBinding?: ForBinding;
1308
+ // Expression: Expression;
1309
+ // Statement: Statement;
1310
+
1311
+ /// ForInStatement : `for` `(` ForDeclaration `in` Expression `)` Statement
1312
+ // ForDeclaration?: ForDeclarationLike;
1313
+ // Expression: Expression;
1314
+ // Statement: Statement;
1315
+
1316
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1317
+ readonly ForBinding?: ForBinding;
1318
+ readonly ForDeclaration?: ForDeclarationLike;
1319
+ readonly Expression: Expression;
1320
+ readonly Statement: Statement;
1321
+ }
1322
+
1323
+ // ForInOfStatement (partial) :
1324
+ // `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1325
+ // `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1326
+ // `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1327
+ export interface ForOfStatement extends BaseParseNode {
1328
+ readonly type: 'ForOfStatement';
1329
+
1330
+ /// ForOfStatement : `for` `(` [lookahead != { `let`, `async` `of` }] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1331
+ // LeftHandSideExpression?: LeftHandSideExpression;
1332
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1333
+ // Statement: Statement;
1334
+
1335
+ /// ForOfStatement : `for` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1336
+ // ForBinding?: ForBinding;
1337
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1338
+ // Statement: Statement;
1339
+
1340
+ /// ForOfStatement : `for` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1341
+ // ForDeclaration?: ForDeclarationLike;
1342
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1343
+ // Statement: Statement;
1344
+
1345
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1346
+ readonly ForDeclaration?: ForDeclarationLike;
1347
+ readonly ForBinding?: ForBinding;
1348
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1349
+ readonly Statement: Statement;
1350
+ }
1351
+
1352
+ // ForInOfStatement (partial) :
1353
+ // `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1354
+ // `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1355
+ // `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1356
+ export interface ForAwaitStatement extends BaseParseNode {
1357
+ readonly type: 'ForAwaitStatement';
1358
+
1359
+ /// ForOfStatement : `for` `await` `(` [lookahead != `let`] LeftHandSideExpression `of` AssignmentExpression `)` Statement
1360
+ // LeftHandSideExpression?: LeftHandSideExpression;
1361
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1362
+ // Statement: Statement;
1363
+
1364
+ /// ForOfStatement : `for` `await` `(` `var` ForBinding `of` AssignmentExpression `)` Statement
1365
+ // ForBinding?: ForBinding;
1366
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1367
+ // Statement: Statement;
1368
+
1369
+ /// ForOfStatement : `for` `await` `(` ForDeclaration `of` AssignmentExpression `)` Statement
1370
+ // ForDeclaration?: ForDeclarationLike;
1371
+ // AssignmentExpression: AssignmentExpressionOrHigher;
1372
+ // Statement: Statement;
1373
+
1374
+ readonly LeftHandSideExpression?: LeftHandSideExpression;
1375
+ readonly ForDeclaration?: ForDeclarationLike;
1376
+ readonly ForBinding?: ForBinding;
1377
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1378
+ readonly Statement: Statement;
1379
+ }
1380
+
1381
+ // ForDeclaration :
1382
+ // LetOrConst ForBinding
1383
+ export type ForDeclarationLike =
1384
+ | ForDeclaration;
1385
+
1386
+ // ForDeclaration :
1387
+ // LetOrConst ForBinding
1388
+ export interface ForDeclaration extends BaseParseNode {
1389
+ readonly type: 'ForDeclaration';
1390
+ readonly LetOrConst: LetOrConst;
1391
+ readonly ForBinding: ForBinding;
1392
+ }
1393
+
1394
+ // ForBinding :
1395
+ // BindingPattern
1396
+ // BindingIdentifier
1397
+ export interface ForBinding extends BaseParseNode {
1398
+ readonly type: 'ForBinding';
1399
+ readonly BindingIdentifier?: BindingIdentifier;
1400
+ readonly BindingPattern?: BindingPattern;
1401
+ }
1402
+
1403
+ // ContinueStatement :
1404
+ // `continue` `;`
1405
+ // `continue` [no LineTerminator here] LabelIdentifier `;`
1406
+ export interface ContinueStatement extends BaseParseNode {
1407
+ readonly type: 'ContinueStatement';
1408
+ readonly LabelIdentifier: LabelIdentifier | null;
1409
+ }
1410
+
1411
+ // BreakStatement :
1412
+ // `break` `;`
1413
+ // `break` [no LineTerminator here] LabelIdentifier `;`
1414
+ export interface BreakStatement extends BaseParseNode {
1415
+ readonly type: 'BreakStatement';
1416
+ readonly LabelIdentifier: LabelIdentifier | null;
1417
+ }
1418
+
1419
+ // ReturnStatement :
1420
+ // `return` `;`
1421
+ // `return` [no LineTerminator here] Expression `;`
1422
+ export interface ReturnStatement extends BaseParseNode {
1423
+ readonly type: 'ReturnStatement';
1424
+ readonly Expression: Expression | null;
1425
+ }
1426
+
1427
+ // WithStatement :
1428
+ // `with` `(` Expression `)` Statement
1429
+ export interface WithStatement extends BaseParseNode {
1430
+ readonly type: 'WithStatement';
1431
+ readonly Expression: Expression;
1432
+ readonly Statement: Statement;
1433
+ }
1434
+
1435
+ // SwitchStatement :
1436
+ // `switch` `(` Expression `)` CaseBlock
1437
+ export interface SwitchStatement extends BaseParseNode {
1438
+ readonly type: 'SwitchStatement';
1439
+ readonly Expression: Expression;
1440
+ readonly CaseBlock: CaseBlock;
1441
+ }
1442
+
1443
+ // CaseBlock :
1444
+ // `{` CaseClauses? `}`
1445
+ // `{` CaseClauses? DefaultClause CaseClauses? `}`
1446
+ export interface CaseBlock extends BaseParseNode {
1447
+ readonly type: 'CaseBlock';
1448
+ readonly CaseClauses_a?: CaseClauses;
1449
+ readonly DefaultClause?: DefaultClause;
1450
+ readonly CaseClauses_b?: CaseClauses;
1451
+ }
1452
+
1453
+ // CaseClauses :
1454
+ // CaseClause
1455
+ // CaseClauses CauseClause
1456
+ export type CaseClauses = readonly CaseClause[];
1457
+
1458
+ // CaseClause :
1459
+ // `case` Expression `:` StatementList?
1460
+ export interface CaseClause extends BaseParseNode {
1461
+ readonly type: 'CaseClause';
1462
+ readonly Expression: Expression;
1463
+ readonly StatementList: StatementList;
1464
+ }
1465
+
1466
+ // DefaultClause :
1467
+ // `default` `:` StatementList?
1468
+ export interface DefaultClause extends BaseParseNode {
1469
+ readonly type: 'DefaultClause';
1470
+ readonly StatementList: StatementList;
1471
+ }
1472
+
1473
+ // LabelledStatement :
1474
+ // LabelIdentifier `:` LabelledItem
1475
+ export interface LabelledStatement extends BaseParseNode {
1476
+ readonly type: 'LabelledStatement';
1477
+ readonly LabelIdentifier: LabelIdentifier;
1478
+ readonly LabelledItem: LabelledItem;
1479
+ }
1480
+
1481
+ // LabelledItem :
1482
+ // Statement
1483
+ // FunctionDeclaration
1484
+ export type LabelledItem =
1485
+ | Statement
1486
+ | FunctionDeclaration; // SPEC QUESTION: why only |FunctionDeclaration| and not generators or async functions?
1487
+
1488
+ // ThrowStatement :
1489
+ // `throw` [no LineTerminator here] Expression `;`
1490
+ export interface ThrowStatement extends BaseParseNode {
1491
+ readonly type: 'ThrowStatement';
1492
+ readonly Expression: Expression;
1493
+ }
1494
+
1495
+ // TryStatement :
1496
+ // `try` Block Catch
1497
+ // `try` Block Finally
1498
+ // `try` Block Catch Finally
1499
+ export interface TryStatement extends BaseParseNode {
1500
+ readonly type: 'TryStatement';
1501
+ readonly Block: Block;
1502
+ readonly Catch: Catch | null;
1503
+ readonly Finally: Finally | null;
1504
+ }
1505
+
1506
+ // Catch :
1507
+ // `catch` `(` CatchParameter `)` Block
1508
+ // `catch` Block
1509
+ //
1510
+ // CatchParameter :
1511
+ // BindingIdentifier
1512
+ // BindingPattern
1513
+ export interface Catch extends BaseParseNode {
1514
+ readonly type: 'Catch';
1515
+ readonly CatchParameter: CatchParameter | null;
1516
+ readonly Block: Block;
1517
+ }
1518
+
1519
+ // Finally :
1520
+ // `finally` Block
1521
+ export type Finally =
1522
+ | Block;
1523
+
1524
+ // CatchParameter :
1525
+ // BindingPattern
1526
+ // BindingIdentifier
1527
+ export type CatchParameter =
1528
+ | BindingPattern
1529
+ | BindingIdentifier;
1530
+
1531
+ // DebuggerStatement :
1532
+ // `debugger` `;`
1533
+ export interface DebuggerStatement extends BaseParseNode {
1534
+ readonly type: 'DebuggerStatement';
1535
+ }
1536
+
1537
+ // A.4 Functions and Classes
1538
+ // https://tc39.es/ecma262/#sec-functions-and-classes
1539
+
1540
+ // UniqueFormalParameters :
1541
+ // FormalParameters
1542
+ export type UniqueFormalParameters =
1543
+ | FormalParameters;
1544
+
1545
+ // FormalParameters :
1546
+ // [empty]
1547
+ // FunctionRestParameter
1548
+ // FormalParameterList
1549
+ // FormalParameterList `,`
1550
+ // FormalParameterList `,` FunctionRestParameter
1551
+ export type FormalParameters = readonly FormalParametersElement[];
1552
+
1553
+ // NON-SPEC
1554
+ export type FormalParametersElement = FormalParameterList[number] | FunctionRestParameter;
1555
+
1556
+ // FormalParameterList :
1557
+ // FormalParameter
1558
+ // FormalParameterList `,` FormalParameterList
1559
+ export type FormalParameterList = readonly FormalParameter[];
1560
+
1561
+ // FunctionRestParameter :
1562
+ // BindingRestElement
1563
+ export type FunctionRestParameter =
1564
+ | BindingRestElement;
1565
+
1566
+ // FormalParameter :
1567
+ // BindingElement
1568
+ export type FormalParameter =
1569
+ | BindingElementLike;
1570
+
1571
+ // NON-SPEC
1572
+ export type FunctionLike =
1573
+ | FunctionDeclarationLike
1574
+ | FunctionExpressionLike;
1575
+
1576
+ // NON-SPEC
1577
+ export type FunctionDeclarationLike =
1578
+ | FunctionDeclaration
1579
+ | GeneratorDeclaration
1580
+ | AsyncFunctionDeclaration
1581
+ | AsyncGeneratorDeclaration;
1582
+
1583
+ // NON-SPEC
1584
+ export type FunctionExpressionLike =
1585
+ | FunctionExpression
1586
+ | GeneratorExpression
1587
+ | AsyncFunctionExpression
1588
+ | AsyncGeneratorExpression;
1589
+
1590
+ // NON-SPEC
1591
+ export type FunctionBodyLike =
1592
+ | FunctionBody
1593
+ | GeneratorBody
1594
+ | AsyncBody
1595
+ | AsyncGeneratorBody;
1596
+
1597
+ // FunctionDeclaration :
1598
+ // `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}`
1599
+ // [+Default] `function` `(` FormalParameters `)` `{` FunctionBody `}`
1600
+ export interface FunctionDeclaration extends BaseParseNode {
1601
+ readonly type: 'FunctionDeclaration';
1602
+ readonly BindingIdentifier: BindingIdentifier | null;
1603
+ readonly FormalParameters: FormalParameters;
1604
+ readonly FunctionBody: FunctionBody;
1605
+ }
1606
+
1607
+ // FunctionExpression :
1608
+ // `function` BindingIdentifier? `(` FormalParameters `)` `{` FunctionBody `}`
1609
+ export interface FunctionExpression extends BaseParseNode {
1610
+ readonly type: 'FunctionExpression';
1611
+ readonly BindingIdentifier: BindingIdentifier | null;
1612
+ readonly FormalParameters: FormalParameters;
1613
+ readonly FunctionBody: FunctionBody;
1614
+ }
1615
+
1616
+ // FunctionBody :
1617
+ // FunctionStatementList
1618
+ export interface FunctionBody extends BaseParseNode {
1619
+ readonly type: 'FunctionBody';
1620
+ readonly directives: string[];
1621
+ readonly strict: boolean;
1622
+ readonly FunctionStatementList: FunctionStatementList;
1623
+ }
1624
+
1625
+ // FunctionStatementList :
1626
+ // StatementList
1627
+ export type FunctionStatementList = StatementList;
1628
+
1629
+ // ArrowFunction :
1630
+ // ArrowParameters [no LineTerminator here] `=>` ConciseBody
1631
+ export interface ArrowFunction extends BaseParseNode {
1632
+ readonly type: 'ArrowFunction';
1633
+ readonly ArrowParameters: ArrowParameters;
1634
+ readonly ConciseBody: ConciseBodyLike;
1635
+ }
1636
+
1637
+ // ArrowParameters :
1638
+ // BindingIdentifier
1639
+ // CoverParenthesizedExpressionAndArrowParameterList
1640
+ //
1641
+ // CoverParenthesizedExpressionAndArrowParameterList refined as:
1642
+ // ArrowFormalParameters (refined) :
1643
+ // `(` UniqueFormalParameters `)`
1644
+ export type ArrowParameters = ArrowFormalParameters;
1645
+
1646
+ // ConciseBody :
1647
+ // ExpressionBody
1648
+ // `{` FunctionBody `}`
1649
+ export type ConciseBodyLike =
1650
+ | FunctionBody
1651
+ | ConciseBody;
1652
+
1653
+ // ConciseBody (partial) :
1654
+ // ExpressionBody
1655
+ export interface ConciseBody extends BaseParseNode {
1656
+ readonly type: 'ConciseBody';
1657
+ readonly directives?: undefined;
1658
+ readonly ExpressionBody: ExpressionBody;
1659
+ }
1660
+
1661
+ // ExpressionBody :
1662
+ // AssignmentExpression
1663
+ export interface ExpressionBody extends BaseParseNode {
1664
+ readonly type: 'ExpressionBody';
1665
+ readonly AssignmentExpression: AssignmentExpressionOrHigher;
1666
+ }
1667
+
1668
+ // CoverParenthesizedExpressionAndArrowParameterList refined as:
1669
+ // ArrowFormalParameters :
1670
+ // `(` UniqueFormalParameters `)`
1671
+ export type ArrowFormalParameters =
1672
+ | UniqueFormalParameters;
1673
+
1674
+ // AsyncArrowFunction :
1675
+ // `async` AsyncArrowBindingIdentifier `=>` AsyncConciseBody
1676
+ // CoverCallExpressionAndAsyncArrowHead `=>` AsyncConciseBody
1677
+ //
1678
+ // CoverCallExpressionAndAsyncArrowHead :
1679
+ // MemberExpression Arguments
1680
+ //
1681
+ // AsyncArrowHead (refined) :
1682
+ // `async` ArrowFormalParameters
1683
+ export interface AsyncArrowFunction extends BaseParseNode {
1684
+ readonly type: 'AsyncArrowFunction';
1685
+ readonly ArrowParameters: ArrowParameters;
1686
+ readonly AsyncConciseBody: AsyncConciseBodyLike;
1687
+ }
1688
+
1689
+ // AsyncConciseBody :
1690
+ // ExpressionBody
1691
+ // `{` AsyncBody `}`
1692
+ export type AsyncConciseBodyLike =
1693
+ | AsyncConciseBody
1694
+ | AsyncBody;
1695
+
1696
+ // AsyncConciseBody (partial) :
1697
+ // ExpressionBody
1698
+ export interface AsyncConciseBody extends BaseParseNode {
1699
+ readonly type: 'AsyncConciseBody';
1700
+ readonly directives?: undefined;
1701
+ readonly ExpressionBody: ExpressionBody;
1702
+ }
1703
+
1704
+ // MethodDefinition :
1705
+ // ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
1706
+ // GeneratorMethod
1707
+ // AsyncMethod
1708
+ // AsyncGeneratorMethod
1709
+ // `get` ClassElementName `(` `)` `{` FunctionBody `}`
1710
+ // `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}`
1711
+ export type MethodDefinitionLike =
1712
+ | MethodDefinition
1713
+ | GeneratorMethod
1714
+ | AsyncMethod
1715
+ | AsyncGeneratorMethod;
1716
+
1717
+ // MethodDefinition (partial) :
1718
+ // ClassElementName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
1719
+ // `get` ClassElementName `(` `)` `{` FunctionBody `}`
1720
+ // `set` ClassElementName `(` PropertySetParameterList `)` `{` FunctionBody `}`
1721
+ export interface MethodDefinition extends BaseParseNode {
1722
+ readonly type: 'MethodDefinition';
1723
+ readonly static?: boolean;
1724
+ readonly ClassElementName: ClassElementName;
1725
+ readonly PropertySetParameterList: PropertySetParameterList | null;
1726
+ readonly UniqueFormalParameters: UniqueFormalParameters | null;
1727
+ readonly FunctionBody: FunctionBody;
1728
+ }
1729
+
1730
+ // PropertySetParameterList :
1731
+ // FormalParameter
1732
+ export type PropertySetParameterList = [FormalParameter];
1733
+
1734
+ // GeneratorDeclaration :
1735
+ // `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}`
1736
+ // [+Default] `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}`
1737
+ export interface GeneratorDeclaration extends BaseParseNode {
1738
+ readonly type: 'GeneratorDeclaration';
1739
+ readonly BindingIdentifier: BindingIdentifier | null;
1740
+ readonly FormalParameters: FormalParameters;
1741
+ readonly GeneratorBody: GeneratorBody;
1742
+ }
1743
+
1744
+ // GeneratorExpression :
1745
+ // `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` GeneratorBody `}`
1746
+ export interface GeneratorExpression extends BaseParseNode {
1747
+ readonly type: 'GeneratorExpression';
1748
+ readonly BindingIdentifier: BindingIdentifier | null;
1749
+ readonly FormalParameters: FormalParameters;
1750
+ readonly GeneratorBody: GeneratorBody;
1751
+ }
1752
+
1753
+ // GeneratorMethod :
1754
+ // `*` ClassElementName `(` UniqueFormalParameters `)` `{` GeneratorBody `}`
1755
+ export interface GeneratorMethod extends BaseParseNode {
1756
+ readonly type: 'GeneratorMethod';
1757
+ readonly static?: boolean;
1758
+ readonly ClassElementName: ClassElementName;
1759
+ readonly PropertySetParameterList: null;
1760
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1761
+ readonly GeneratorBody: GeneratorBody;
1762
+ }
1763
+
1764
+ // GeneratorBody :
1765
+ // FunctionBody
1766
+ export interface GeneratorBody extends BaseParseNode {
1767
+ readonly type: 'GeneratorBody';
1768
+ readonly directives: string[];
1769
+ readonly strict: boolean;
1770
+ readonly FunctionStatementList: FunctionStatementList;
1771
+ }
1772
+
1773
+ // YieldExpression :
1774
+ // `yield`
1775
+ // `yield` [no LineTerminator here] AssignmentExpression
1776
+ // `yield` [no LineTerminator here] `*` AssignmentExpression
1777
+ export interface YieldExpression extends BaseParseNode {
1778
+ readonly type: 'YieldExpression';
1779
+ readonly hasStar: boolean;
1780
+ readonly AssignmentExpression: AssignmentExpressionOrHigher | null;
1781
+ }
1782
+
1783
+ // AsyncGeneratorDeclaration :
1784
+ // `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1785
+ // [+Default] `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1786
+ export interface AsyncGeneratorDeclaration extends BaseParseNode {
1787
+ readonly type: 'AsyncGeneratorDeclaration';
1788
+ readonly BindingIdentifier: BindingIdentifier | null;
1789
+ readonly FormalParameters: FormalParameters;
1790
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1791
+ }
1792
+
1793
+ // AsyncGeneratorExpression :
1794
+ // `async` `function` `*` BindingIdentifier? `(` FormalParameters `)` `{` AsyncGeneratorBody `}`
1795
+ export interface AsyncGeneratorExpression extends BaseParseNode {
1796
+ readonly type: 'AsyncGeneratorExpression';
1797
+ readonly BindingIdentifier: BindingIdentifier | null;
1798
+ readonly FormalParameters: FormalParameters;
1799
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1800
+ }
1801
+
1802
+ // AsyncGeneratorMethod :
1803
+ // `async` `*` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncGeneratorBody `}`
1804
+ export interface AsyncGeneratorMethod extends BaseParseNode {
1805
+ readonly type: 'AsyncGeneratorMethod';
1806
+ readonly static?: boolean;
1807
+ readonly ClassElementName: ClassElementName;
1808
+ readonly PropertySetParameterList: null;
1809
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1810
+ readonly AsyncGeneratorBody: AsyncGeneratorBody;
1811
+ }
1812
+
1813
+ // AsyncGeneratorBody :
1814
+ // FunctionBody
1815
+ export interface AsyncGeneratorBody extends BaseParseNode {
1816
+ readonly type: 'AsyncGeneratorBody';
1817
+ readonly directives: string[];
1818
+ readonly strict: boolean;
1819
+ readonly FunctionStatementList: FunctionStatementList;
1820
+ }
1821
+
1822
+ // AsyncFunctionDeclaration :
1823
+ // `async` `function` `*` BindingIdentifier `(` FormalParameters `)` `{` AsyncBody `}`
1824
+ // [+Default] `async` `function` `*` `(` FormalParameters `)` `{` AsyncBody `}`
1825
+ export interface AsyncFunctionDeclaration extends BaseParseNode {
1826
+ readonly type: 'AsyncFunctionDeclaration';
1827
+ readonly BindingIdentifier: BindingIdentifier | null;
1828
+ readonly FormalParameters: FormalParameters;
1829
+ readonly AsyncBody: AsyncBody;
1830
+ }
1831
+
1832
+ // AsyncFunctionExpression :
1833
+ // `async` `function` BindingIdentifier? `(` FormalParameters `)` `{` AsyncBody `}`
1834
+ export interface AsyncFunctionExpression extends BaseParseNode {
1835
+ readonly type: 'AsyncFunctionExpression';
1836
+ readonly BindingIdentifier: BindingIdentifier | null;
1837
+ readonly FormalParameters: FormalParameters;
1838
+ readonly AsyncBody: AsyncBody;
1839
+ }
1840
+
1841
+ // AsyncMethod :
1842
+ // `async` ClassElementName `(` UniqueFormalParameters `)` `{` AsyncBody `}`
1843
+ export interface AsyncMethod extends BaseParseNode {
1844
+ readonly type: 'AsyncMethod';
1845
+ readonly static?: boolean;
1846
+ readonly ClassElementName: ClassElementName;
1847
+ readonly PropertySetParameterList: null;
1848
+ readonly UniqueFormalParameters: UniqueFormalParameters;
1849
+ readonly AsyncBody: AsyncBody;
1850
+ }
1851
+
1852
+ // AsyncBody :
1853
+ // FunctionBody
1854
+ export interface AsyncBody extends BaseParseNode {
1855
+ readonly type: 'AsyncBody';
1856
+ readonly directives: string[];
1857
+ readonly strict: boolean;
1858
+ readonly FunctionStatementList: FunctionStatementList;
1859
+ }
1860
+
1861
+ // AwaitExpression : `await` UnaryExpression
1862
+ export interface AwaitExpression extends BaseParseNode {
1863
+ readonly type: 'AwaitExpression';
1864
+ readonly UnaryExpression: UnaryExpressionOrHigher;
1865
+ }
1866
+
1867
+ // pending
1868
+
1869
+ // NON-SPEC
1870
+ export type ClassLike =
1871
+ | ClassDeclaration
1872
+ | ClassExpression;
1873
+
1874
+ // ClassDeclaration :
1875
+ // `class` BindingIdentifier ClassTail
1876
+ // [+Default] `class` ClassTail
1877
+ export interface ClassDeclaration extends BaseParseNode {
1878
+ readonly type: 'ClassDeclaration';
1879
+ readonly BindingIdentifier: BindingIdentifier | null;
1880
+ readonly ClassTail: ClassTail;
1881
+ }
1882
+
1883
+ // ClassExpression :
1884
+ // `class` BindingIdentifier? ClassTail
1885
+ export interface ClassExpression extends BaseParseNode {
1886
+ readonly type: 'ClassExpression';
1887
+ readonly BindingIdentifier: BindingIdentifier | null;
1888
+ readonly ClassTail: ClassTail;
1889
+ }
1890
+
1891
+ // ClassTail :
1892
+ // ClassHeritage? `{` ClassBody? `}`
1893
+ export interface ClassTail extends BaseParseNode {
1894
+ readonly type: 'ClassTail';
1895
+ readonly ClassHeritage: ClassHeritage | null;
1896
+ readonly ClassBody: ClassBody | null;
1897
+ }
1898
+
1899
+ // ClassHeritage :
1900
+ // `extends` LeftHandSideExpression
1901
+ export type ClassHeritage =
1902
+ | LeftHandSideExpression;
1903
+
1904
+ // ClassBody :
1905
+ // ClassElementList
1906
+ export type ClassBody =
1907
+ | ClassElementList;
1908
+
1909
+ // ClassElementList :
1910
+ // ClassElement
1911
+ // ClassElementList ClassElement
1912
+ export type ClassElementList = readonly ClassElement[];
1913
+
1914
+ // ClassElement :
1915
+ // MethodDefinition
1916
+ // `static` MethodDefinition
1917
+ // FieldDefinition `;`
1918
+ // `static` FieldDefinition `;`
1919
+ // ClassStaticBlock
1920
+ // `;`
1921
+ export type ClassElement =
1922
+ | MethodDefinitionLike
1923
+ | FieldDefinition
1924
+ | ClassStaticBlock;
1925
+
1926
+ // FieldDefinition :
1927
+ // ClassElementName Initializer?
1928
+ export interface FieldDefinition extends BaseParseNode {
1929
+ readonly type: 'FieldDefinition';
1930
+ readonly static?: boolean;
1931
+ readonly ClassElementName: ClassElementName;
1932
+ readonly Initializer: Initializer | null;
1933
+ }
1934
+
1935
+ // ClassElementName :
1936
+ // PropertyName
1937
+ // PrivateIdentifier
1938
+ export type ClassElementName =
1939
+ | PropertyNameLike
1940
+ | PrivateIdentifier;
1941
+
1942
+ // ClassStaticBlock :
1943
+ // `static` `{` ClassStaticBlockBody `}`
1944
+ export interface ClassStaticBlock extends BaseParseNode {
1945
+ readonly type: 'ClassStaticBlock';
1946
+ readonly static: true;
1947
+ readonly ClassStaticBlockBody: ClassStaticBlockBody;
1948
+ }
1949
+
1950
+ // ClassStaticBlockBody :
1951
+ // ClassStaticBlockStatementList
1952
+ export interface ClassStaticBlockBody extends BaseParseNode {
1953
+ readonly type: 'ClassStaticBlockBody';
1954
+ readonly ClassStaticBlockStatementList: ClassStaticBlockStatementList;
1955
+ }
1956
+
1957
+ // ClassStaticBlockStatementList :
1958
+ // StatementList?
1959
+ export type ClassStaticBlockStatementList =
1960
+ | StatementList;
1961
+
1962
+
1963
+ // A.5 Scripts and Modules
1964
+ // https://tc39.es/ecma262/#sec-scripts-and-modules
1965
+
1966
+ // Script :
1967
+ // ScriptBody?
1968
+ export interface Script extends BaseParseNode {
1969
+ readonly type: 'Script';
1970
+ readonly ScriptBody: ScriptBody | null;
1971
+ }
1972
+
1973
+ // ScriptBody :
1974
+ // StatementList
1975
+ export interface ScriptBody extends BaseParseNode {
1976
+ readonly type: 'ScriptBody';
1977
+ readonly StatementList: StatementList;
1978
+ }
1979
+
1980
+ // Module :
1981
+ // ModuleBody?
1982
+ export interface Module extends BaseParseNode {
1983
+ readonly type: 'Module';
1984
+ readonly ModuleBody: ModuleBody | null;
1985
+ readonly hasTopLevelAwait: boolean;
1986
+ }
1987
+
1988
+ // ModuleBody :
1989
+ // ModuleItemList
1990
+ export interface ModuleBody extends BaseParseNode {
1991
+ readonly type: 'ModuleBody';
1992
+ readonly ModuleItemList: ModuleItemList;
1993
+ }
1994
+
1995
+ // ModuleItemList :
1996
+ // ModuleItem
1997
+ // ModuleItemList ModuleItem
1998
+ export type ModuleItemList = readonly ModuleItem[];
1999
+
2000
+ // ModuleItem :
2001
+ // ImportDeclaration
2002
+ // ExportDeclaration
2003
+ // StatementListItem
2004
+ export type ModuleItem =
2005
+ | ImportDeclaration
2006
+ | ExportDeclaration
2007
+ | StatementListItem;
2008
+
2009
+ // ModuleExportName :
2010
+ // IdentifierName
2011
+ // StringLiteral
2012
+ export type ModuleExportName =
2013
+ | IdentifierName
2014
+ | StringLiteral;
2015
+
2016
+ // ImportDeclaration :
2017
+ // `import` ImportClause FromClause WithClause? `;`
2018
+ // `import` ModuleSpecifier WithClause? `;`
2019
+ export interface ImportDeclaration extends BaseParseNode {
2020
+ readonly type: 'ImportDeclaration';
2021
+ readonly ModuleSpecifier?: PrimaryExpression;
2022
+ /* [import-defer] */ readonly Phase: 'defer' | 'evaluation';
2023
+ readonly ImportClause?: ImportClause;
2024
+ readonly FromClause?: FromClause;
2025
+ readonly WithClause?: WithClause;
2026
+ }
2027
+
2028
+ // ImportClause :
2029
+ // ImportedDefaultBinding
2030
+ // NameSpaceImport
2031
+ // NamedImports
2032
+ // ImportedDefaultBinding `,` NameSpaceImport
2033
+ // ImportedDefaultBinding `,` NamedImports
2034
+ export interface ImportClause extends BaseParseNode {
2035
+ readonly type: 'ImportClause';
2036
+ readonly ImportedDefaultBinding?: ImportedDefaultBinding;
2037
+ readonly NameSpaceImport?: NameSpaceImport;
2038
+ readonly NamedImports?: NamedImports;
2039
+ }
2040
+
2041
+ // ImportedDefaultBinding :
2042
+ // ImportedBinding
2043
+ export interface ImportedDefaultBinding extends BaseParseNode {
2044
+ readonly type: 'ImportedDefaultBinding';
2045
+ readonly ImportedBinding: ImportedBinding;
2046
+ }
2047
+
2048
+ // NameSpaceImport :
2049
+ // `*` `as` ImportedBinding
2050
+ export interface NameSpaceImport extends BaseParseNode {
2051
+ readonly type: 'NameSpaceImport';
2052
+ readonly ImportedBinding: ImportedBinding;
2053
+ }
2054
+
2055
+ // NamedImports :
2056
+ // `{` `}`
2057
+ // `{` ImportsList `}`
2058
+ // `{` ImportsList `,` `}`
2059
+ export interface NamedImports extends BaseParseNode {
2060
+ readonly type: 'NamedImports';
2061
+ readonly ImportsList: ImportsList;
2062
+ }
2063
+
2064
+ // FromClause :
2065
+ // `from` ModuleSpecifier
2066
+ export type FromClause =
2067
+ | ModuleSpecifier;
2068
+
2069
+ // ImportsList :
2070
+ // ImportSpecifier
2071
+ // ImportsList `,` ImportSpecifier
2072
+ export type ImportsList = readonly ImportSpecifier[];
2073
+
2074
+ // ImportSpecifier :
2075
+ // ImportedBinding
2076
+ // ModuleExportName `as` ImportedBinding
2077
+ export interface ImportSpecifier extends BaseParseNode {
2078
+ readonly type: 'ImportSpecifier';
2079
+ readonly ModuleExportName?: ModuleExportName;
2080
+ readonly ImportedBinding: ImportedBinding;
2081
+ }
2082
+
2083
+ // ModuleSpecifier :
2084
+ // StringLiteral
2085
+ export type ModuleSpecifier =
2086
+ | StringLiteral;
2087
+
2088
+ // ImportedBinding :
2089
+ // BindingIdentifier
2090
+ export type ImportedBinding =
2091
+ | BindingIdentifier;
2092
+
2093
+ // WithClause :
2094
+ // `with` `{` `}`
2095
+ // `with` `{` WithEntries `,`? `}`
2096
+ export interface WithClause extends BaseParseNode {
2097
+ readonly type: 'WithClause';
2098
+ readonly WithEntries: WithEntries;
2099
+ }
2100
+
2101
+ // WithEntries :
2102
+ // AttributeKey `:` StringLiteral
2103
+ // AttributeKey `:` StringLiteral `,` WithEntries
2104
+ export type WithEntries = readonly WithEntry[];
2105
+ export interface WithEntry extends BaseParseNode {
2106
+ readonly type: 'WithEntry';
2107
+ readonly AttributeKey: AttributeKey;
2108
+ readonly AttributeValue: StringLiteral;
2109
+ }
2110
+
2111
+ // AttributeKey :
2112
+ // IdentifierName
2113
+ // StringLiteral
2114
+ export type AttributeKey =
2115
+ | IdentifierName
2116
+ | StringLiteral;
2117
+
2118
+
2119
+ // ExportDeclaration :
2120
+ // `export` ExportFromClause FromClause WithClause? `;`
2121
+ // `export` NamedExports `;`
2122
+ // `export` VariableStatement
2123
+ // `export` Declaration
2124
+ // `export` `default` HoistableDeclaration
2125
+ // `export` `default` ClassDeclaration
2126
+ // `export` `default` AssignmentExpression `;`
2127
+ export interface ExportDeclaration extends BaseParseNode {
2128
+ readonly type: 'ExportDeclaration';
2129
+ readonly default: boolean;
2130
+ readonly HoistableDeclaration?: HoistableDeclaration;
2131
+ readonly ClassDeclaration?: ClassDeclaration;
2132
+ readonly AssignmentExpression?: AssignmentExpressionOrHigher;
2133
+ readonly Declaration?: Declaration;
2134
+ readonly VariableStatement?: VariableStatement;
2135
+ readonly ExportFromClause?: ExportFromClauseLike;
2136
+ readonly FromClause?: FromClause;
2137
+ readonly WithClause?: WithClause;
2138
+ readonly NamedExports?: NamedExports;
2139
+ }
2140
+
2141
+ // ExportFromClause :
2142
+ // `*`
2143
+ // `*` as ModuleExportName
2144
+ // NamedExports
2145
+ export type ExportFromClauseLike =
2146
+ | NamedExports
2147
+ | ExportFromClause;
2148
+
2149
+ // ExportFromClause (partial) :
2150
+ // `*`
2151
+ // `*` as ModuleExportName
2152
+ export interface ExportFromClause extends BaseParseNode {
2153
+ readonly type: 'ExportFromClause';
2154
+ readonly ModuleExportName?: ModuleExportName;
2155
+ }
2156
+
2157
+ // NamedExports :
2158
+ // `{` `}`
2159
+ // `{` ExportsList `}`
2160
+ // `{` ExportsList `,` `}`
2161
+ export interface NamedExports extends BaseParseNode {
2162
+ readonly type: 'NamedExports';
2163
+ readonly ExportsList: ExportsList;
2164
+ }
2165
+
2166
+ // ExportsList :
2167
+ // ExportSpecifier
2168
+ // ExportsList `,` ExportSpecifier
2169
+ export type ExportsList = readonly ExportSpecifier[];
2170
+
2171
+ // ExportSpecifier :
2172
+ // ModuleExportName
2173
+ // ModuleExportName `as` ModuleExportName
2174
+ export interface ExportSpecifier extends BaseParseNode {
2175
+ readonly type: 'ExportSpecifier';
2176
+ readonly localName: ModuleExportName;
2177
+ readonly exportName: ModuleExportName;
2178
+ }
2179
+
2180
+ export type AssignmentPattern = ObjectAssignmentPattern | ArrayAssignmentPattern | AssignmentProperty | AssignmentElement | ParseNode.Elision;
2181
+ export type ObjectAssignmentPattern = {
2182
+ type: 'ObjectAssignmentPattern';
2183
+ AssignmentPropertyList: (AssignmentProperty | AssignmentPattern)[];
2184
+ AssignmentRestProperty: AssignmentRestProperty | undefined;
2185
+ }
2186
+ export type AssignmentProperty = {
2187
+ type: 'AssignmentProperty';
2188
+ IdentifierReference: ParseNode.IdentifierReference;
2189
+ Initializer?: ParseNode.Initializer | null | undefined;
2190
+ } | {
2191
+ type: 'AssignmentProperty';
2192
+ PropertyName: ParseNode.PropertyNameLike | null;
2193
+ AssignmentElement: AssignmentElement;
2194
+ }
2195
+ export type AssignmentElement = {
2196
+ type: 'AssignmentElement';
2197
+ DestructuringAssignmentTarget: ParseNode.AssignmentExpressionOrHigher;
2198
+ Initializer: ParseNode.Initializer | undefined | null;
2199
+ }
2200
+
2201
+ export type ArrayAssignmentPattern = {
2202
+ type: 'ArrayAssignmentPattern';
2203
+ AssignmentElementList: AssignmentElisionElement[];
2204
+ AssignmentRestElement: AssignmentRestElement | undefined;
2205
+ }
2206
+ export type AssignmentElisionElement = ParseNode.Elision | AssignmentElement | AssignmentPattern;
2207
+ export type AssignmentRestProperty = {
2208
+ type: 'AssignmentRestProperty';
2209
+ DestructuringAssignmentTarget: ParseNode.AssignmentExpressionOrHigher;
2210
+ }
2211
+
2212
+ // Helpers
2213
+ // NON-SPEC
2214
+
2215
+ // Gets all keys of all constituents of a union
2216
+ type AllKeysOf<T> = T extends unknown ? keyof T : never;
2217
+
2218
+ // Gets all values for a given key for all constituents of a union
2219
+ type AllValuesOf<T, K extends AllKeysOf<T>> = T extends unknown ? K extends keyof T ? T[K] : never : never;
2220
+
2221
+ // NON-SPEC
2222
+ /**
2223
+ * Used internally to describe a node that is still in the process of being parsed. Unfinished nodes may not yet be
2224
+ * fully defined.
2225
+ */
2226
+ export type Unfinished<T extends ParseNode = ParseNode> = (
2227
+ // An unfinished node...
2228
+
2229
+ // ...includes all properties of BaseParseNode
2230
+ & {
2231
+ type?: T['type'] & ParseNode['type'];
2232
+ location: {
2233
+ startIndex: number;
2234
+ endIndex: number;
2235
+ start: { line: number, column: number };
2236
+ end: { line: number, column: number };
2237
+ };
2238
+ strict: boolean;
2239
+ sourceText: string;
2240
+ }
2241
+
2242
+ // ...includes all properties of all potential types, with each property marked as optional
2243
+ & {
2244
+ -readonly [K in Exclude<AllKeysOf<T>, 'location' | 'strict' | 'sourceText'>]?: AllValuesOf<T, K>;
2245
+ }
2246
+ );
2247
+
2248
+ // NON-SPEC
2249
+ /**
2250
+ * Used internally to indicate a node that has finished parsing.
2251
+ */
2252
+ export type Finished<T extends BaseParseNode | Unfinished<ParseNode>, K extends T['type'] & ParseNode['type']> =
2253
+ T extends Unfinished<ParseNode> ? Extract<ParseNodesByType[K], T> :
2254
+ T;
2255
+ }
2256
+
2257
+ // eslint-disable-next-line @typescript-eslint/no-namespace
2258
+ export namespace ParseNode {
2259
+ export type WithStatementListChild =
2260
+ | ModuleBody
2261
+ | ScriptBody
2262
+ | Block
2263
+ | CaseClause
2264
+ | DefaultClause
2265
+ | ClassStaticBlockBody
2266
+ | FunctionBody
2267
+ | GeneratorBody
2268
+ | AsyncBody
2269
+ | AsyncGeneratorBody;
2270
+ }
2271
+
2272
+ /** https://tc39.es/ecma262/multipage/text-processing.html#sec-patterns */
2273
+ // eslint-disable-next-line @typescript-eslint/no-namespace
2274
+ export namespace ParseNode.RegExp {
2275
+ export interface NodeWithPosition {
2276
+ readonly position: number;
2277
+ }
2278
+ export interface Pattern {
2279
+ readonly type: 'Pattern';
2280
+ readonly Disjunction: Disjunction;
2281
+ readonly capturingGroups: readonly { readonly GroupName: string | undefined, readonly position: number }[];
2282
+ }
2283
+ export interface Disjunction {
2284
+ readonly type: 'Disjunction';
2285
+ readonly Alternative: Alternative;
2286
+ readonly Disjunction: Disjunction | undefined;
2287
+ }
2288
+ export interface Alternative {
2289
+ readonly type: 'Alternative';
2290
+ readonly Term: readonly Term[];
2291
+ }
2292
+ export type Term = Term_Assertion | Term_Atom;
2293
+ export interface Term_Assertion {
2294
+ readonly type: 'Term';
2295
+ readonly production: 'Assertion';
2296
+ readonly Assertion: Assertion;
2297
+ }
2298
+ export interface Term_Atom {
2299
+ readonly type: 'Term';
2300
+ readonly production: 'Atom';
2301
+ readonly Atom: Atom;
2302
+ readonly Quantifier: Quantifier | undefined;
2303
+ readonly leftCapturingParenthesesBefore: number;
2304
+ readonly capturingParenthesesWithin: number;
2305
+ }
2306
+ export type Assertion = Assertion_Plain | Assertion_LookaheadOrLookbehind;
2307
+ export interface Assertion_Plain {
2308
+ readonly type: 'Assertion';
2309
+ readonly production: '^' | '$' | 'b' | 'B';
2310
+ }
2311
+ export interface Assertion_LookaheadOrLookbehind {
2312
+ readonly type: 'Assertion';
2313
+ readonly production: '?=' | '?!' | '?<=' | '?<!';
2314
+ readonly Disjunction: Disjunction;
2315
+ }
2316
+ export interface Quantifier {
2317
+ readonly type: 'Quantifier';
2318
+ readonly QuantifierPrefix: QuantifierPrefix;
2319
+ readonly QuestionMark: boolean;
2320
+ }
2321
+ export type QuantifierPrefix = QuantifierPrefix_Plain | QuantifierPrefix_Count;
2322
+ export interface QuantifierPrefix_Plain {
2323
+ readonly type: 'QuantifierPrefix';
2324
+ readonly production: '*' | '+' | '?';
2325
+ }
2326
+ export interface QuantifierPrefix_Count {
2327
+ readonly type: 'QuantifierPrefix';
2328
+ readonly production: '{}';
2329
+ readonly DecimalDigits_a: number;
2330
+ readonly DecimalDigits_b: number | undefined;
2331
+ }
2332
+ export type Atom = Atom_PatternCharacter | Atom_Dot | Atom_AtomEscape | Atom_CharacterClass | Atom_Group | Atom_Modifier;
2333
+ export interface Atom_PatternCharacter {
2334
+ readonly type: 'Atom';
2335
+ readonly production: 'PatternCharacter'
2336
+ readonly PatternCharacter: Character;
2337
+ }
2338
+ export interface Atom_Dot {
2339
+ readonly type: 'Atom';
2340
+ readonly production: '.';
2341
+ }
2342
+ export interface Atom_AtomEscape {
2343
+ readonly type: 'Atom';
2344
+ readonly production: 'AtomEscape';
2345
+ readonly AtomEscape: AtomEscape;
2346
+ }
2347
+ export interface Atom_CharacterClass {
2348
+ readonly type: 'Atom';
2349
+ readonly production: 'CharacterClass';
2350
+ readonly CharacterClass: CharacterClass;
2351
+ }
2352
+ export interface Atom_Group {
2353
+ readonly type: 'Atom';
2354
+ readonly production: 'Group';
2355
+ readonly leftCapturingParenthesesBefore: number;
2356
+ readonly GroupSpecifier: string | undefined;
2357
+ readonly Disjunction: Disjunction;
2358
+ }
2359
+ export interface Atom_Modifier {
2360
+ readonly type: 'Atom';
2361
+ readonly production: 'Modifier';
2362
+ readonly leftCapturingParenthesesBefore: number;
2363
+ readonly Disjunction: Disjunction;
2364
+ readonly AddModifiers: RegularExpressionModifiers | undefined;
2365
+ readonly RemoveModifiers: RegularExpressionModifiers | undefined;
2366
+ }
2367
+ export type RegularExpressionModifier = 'i' | 'm' | 's';
2368
+ export type RegularExpressionModifiers = readonly RegularExpressionModifier[];
2369
+ export type AtomEscape = AtomEscape_DecimalEscape | AtomEscape_CharacterClassEscape | AtomEscape_CharacterEscape | AtomEscape_CaptureGroupName;
2370
+ export interface AtomEscape_DecimalEscape {
2371
+ readonly type: 'AtomEscape';
2372
+ readonly production: 'DecimalEscape';
2373
+ readonly DecimalEscape: DecimalEscape;
2374
+ }
2375
+ export interface AtomEscape_CharacterClassEscape {
2376
+ readonly type: 'AtomEscape';
2377
+ readonly production: 'CharacterClassEscape';
2378
+ readonly CharacterClassEscape: CharacterClassEscape;
2379
+ }
2380
+ export interface AtomEscape_CharacterEscape {
2381
+ readonly type: 'AtomEscape';
2382
+ readonly production: 'CharacterEscape';
2383
+ readonly CharacterEscape: CharacterEscape;
2384
+ }
2385
+ export interface AtomEscape_CaptureGroupName extends NodeWithPosition {
2386
+ readonly type: 'AtomEscape';
2387
+ readonly production: 'CaptureGroupName';
2388
+ readonly GroupName: string;
2389
+ readonly groupSpecifiersThatMatchSelf: readonly ParseNode.RegExp.Atom_Group[];
2390
+ }
2391
+ export type CharacterEscape = CharacterEscape_ControlEscape | CharacterEscape_AsciiLetter | CharacterEscape_0 | CharacterEscape_HexEscapeSequence | CharacterEscape_RegExpUnicodeEscapeSequence | CharacterEscape_IdentityEscape;
2392
+ export interface CharacterEscape_ControlEscape {
2393
+ readonly type: 'CharacterEscape';
2394
+ readonly production: 'ControlEscape';
2395
+ readonly ControlEscape: 'f' | 'n' | 'r' | 't' | 'v';
2396
+ }
2397
+ export interface CharacterEscape_AsciiLetter {
2398
+ readonly type: 'CharacterEscape';
2399
+ readonly production: 'AsciiLetter';
2400
+ readonly AsciiLetter: string;
2401
+ }
2402
+ export interface CharacterEscape_0 {
2403
+ readonly type: 'CharacterEscape';
2404
+ readonly production: '0';
2405
+ }
2406
+ export interface CharacterEscape_HexEscapeSequence {
2407
+ readonly type: 'CharacterEscape';
2408
+ readonly production: 'HexEscapeSequence';
2409
+ readonly HexEscapeSequence: HexEscapeSequence;
2410
+ }
2411
+ export interface CharacterEscape_RegExpUnicodeEscapeSequence {
2412
+ readonly type: 'CharacterEscape';
2413
+ readonly production: 'RegExpUnicodeEscapeSequence';
2414
+ readonly RegExpUnicodeEscapeSequence: RegExpUnicodeEscapeSequence;
2415
+ }
2416
+ export interface CharacterEscape_IdentityEscape {
2417
+ readonly type: 'CharacterEscape';
2418
+ readonly production: 'IdentityEscape';
2419
+ readonly IdentityEscape: Character;
2420
+ }
2421
+ export interface RegExpUnicodeEscapeSequence {
2422
+ readonly type: 'RegExpUnicodeEscapeSequence';
2423
+ readonly CodePoint?: number;
2424
+ readonly HexLeadSurrogate?: number | undefined;
2425
+ readonly HexTrailSurrogate?: number | undefined;
2426
+ readonly Hex4Digits?: number | undefined;
2427
+ }
2428
+ export interface DecimalEscape {
2429
+ readonly type: 'DecimalEscape';
2430
+ readonly position: number;
2431
+ readonly value: number;
2432
+ }
2433
+ export type CharacterClassEscape = CharacterClassEscape_Plain | CharacterClassEscape_UnicodePropertyValue;
2434
+ export interface CharacterClassEscape_Plain {
2435
+ readonly type: 'CharacterClassEscape';
2436
+ readonly production: 'd' | 'D' | 's' | 'S' | 'w' | 'W';
2437
+ }
2438
+ export interface CharacterClassEscape_UnicodePropertyValue {
2439
+ readonly type: 'CharacterClassEscape';
2440
+ readonly production: 'p' | 'P';
2441
+ readonly UnicodePropertyValueExpression: UnicodePropertyValueExpression;
2442
+ }
2443
+ export type UnicodePropertyValueExpression = UnicodePropertyValueExpression_Eq | UnicodePropertyValueExpression_Lone;
2444
+ export interface UnicodePropertyValueExpression_Eq {
2445
+ readonly type: 'UnicodePropertyValueExpression';
2446
+ readonly production: '=';
2447
+ readonly UnicodePropertyName: string;
2448
+ readonly UnicodePropertyValue: string;
2449
+ }
2450
+ export interface UnicodePropertyValueExpression_Lone {
2451
+ readonly type: 'UnicodePropertyValueExpression';
2452
+ readonly production: 'Lone';
2453
+ readonly LoneUnicodePropertyNameOrValue: string;
2454
+ }
2455
+ export interface CharacterClass {
2456
+ readonly type: 'CharacterClass';
2457
+ readonly invert: boolean;
2458
+ readonly ClassContents: ClassContents;
2459
+ }
2460
+ export type ClassContents = ClassContents_Empty | ClassContents_NonUnicodeSetMode | ClassContents_UnicodeSetMode;
2461
+ export interface ClassContents_Empty {
2462
+ readonly type: 'ClassContents';
2463
+ readonly production: 'Empty';
2464
+ }
2465
+ export interface ClassContents_UnicodeSetMode {
2466
+ readonly type: 'ClassContents';
2467
+ readonly production: 'ClassSetExpression';
2468
+ readonly ClassSetExpression: ClassSetExpression;
2469
+ }
2470
+ export interface ClassContents_NonUnicodeSetMode {
2471
+ readonly type: 'ClassContents';
2472
+ readonly production: 'NonEmptyClassRanges';
2473
+ readonly NonemptyClassRanges: NonEmptyClassRanges;
2474
+ }
2475
+ export type NonEmptyClassRanges = readonly ClassRange[];
2476
+ /** NON-SPEC */
2477
+ export type ClassRange = ClassAtom | readonly [start: ClassAtom, end: ClassAtom];
2478
+ export type ClassAtom = ClassAtom_Dash | ClassAtom_SourceCharacter | ClassAtom_ClassEscape;
2479
+ export interface ClassAtom_Dash {
2480
+ readonly type: 'ClassAtom';
2481
+ readonly production: '-';
2482
+ }
2483
+ export interface ClassAtom_SourceCharacter {
2484
+ readonly type: 'ClassAtom';
2485
+ readonly production: 'SourceCharacter';
2486
+ readonly SourceCharacter: string;
2487
+ }
2488
+ export interface ClassAtom_ClassEscape {
2489
+ readonly type: 'ClassAtom';
2490
+ readonly production: 'ClassEscape';
2491
+ readonly ClassEscape: ClassEscape;
2492
+ }
2493
+ export type ClassEscape = ClassEscape_Plain | ClassEscape_CharacterClassEscape | ClassEscape_CharacterEscape;
2494
+ export interface ClassEscape_Plain {
2495
+ readonly type: 'ClassEscape';
2496
+ readonly production: 'b' | '-';
2497
+ }
2498
+ export interface ClassEscape_CharacterClassEscape {
2499
+ readonly type: 'ClassEscape';
2500
+ readonly production: 'CharacterClassEscape';
2501
+ readonly CharacterClassEscape: CharacterClassEscape;
2502
+ }
2503
+ export interface ClassEscape_CharacterEscape {
2504
+ readonly type: 'ClassEscape';
2505
+ readonly production: 'CharacterEscape';
2506
+ readonly CharacterEscape: CharacterEscape;
2507
+ }
2508
+ export type ClassSetExpression = ClassUnion | ClassIntersection | ClassSubtraction;
2509
+ export interface ClassUnion {
2510
+ readonly type: 'ClassUnion';
2511
+ readonly union: readonly (ClassSetRange | ClassSetOperand)[];
2512
+ }
2513
+ export interface ClassIntersection {
2514
+ readonly type: 'ClassIntersection';
2515
+ readonly operands: readonly ClassSetOperand[];
2516
+ }
2517
+ export interface ClassSubtraction {
2518
+ readonly type: 'ClassSubtraction';
2519
+ readonly operands: readonly ClassSetOperand[];
2520
+ }
2521
+ export interface ClassSetRange {
2522
+ readonly type: 'ClassSetRange';
2523
+ readonly left: ClassSetCharacter;
2524
+ readonly right: ClassSetCharacter;
2525
+ }
2526
+ export type ClassSetOperand = ClassSetOperand_NestedClass | ClassSetOperand_ClassStringDisjunction | ClassSetOperand_ClassSetCharacter;
2527
+ export interface ClassSetOperand_NestedClass {
2528
+ readonly type: 'ClassSetOperand';
2529
+ readonly production: 'NestedClass';
2530
+ readonly NestedClass: NestedClass;
2531
+ }
2532
+ export interface ClassSetOperand_ClassStringDisjunction {
2533
+ readonly type: 'ClassSetOperand';
2534
+ readonly production: 'ClassStringDisjunction';
2535
+ readonly ClassStringDisjunction: ClassStringDisjunction;
2536
+ }
2537
+ export interface ClassSetOperand_ClassSetCharacter {
2538
+ readonly type: 'ClassSetOperand';
2539
+ readonly production: 'ClassSetCharacter';
2540
+ readonly ClassSetCharacter: ClassSetCharacter;
2541
+ }
2542
+ export type NestedClass = NestedClass_ClassContents | NestedClass_CharacterClassEscape;
2543
+ export interface NestedClass_ClassContents {
2544
+ readonly type: 'NestedClass';
2545
+ readonly production: 'ClassContents';
2546
+ readonly ClassContents: ClassContents;
2547
+ readonly invert: boolean;
2548
+ }
2549
+ export interface NestedClass_CharacterClassEscape {
2550
+ readonly type: 'NestedClass';
2551
+ readonly production: 'CharacterClassEscape';
2552
+ readonly CharacterClassEscape: CharacterClassEscape;
2553
+ }
2554
+ export interface ClassStringDisjunction {
2555
+ readonly type: 'ClassStringDisjunction';
2556
+ readonly ClassString: ClassSetCharacter[][];
2557
+ }
2558
+ export type ClassString = string;
2559
+
2560
+ // For UnicodeCharacter:
2561
+ // [lookahead ∉ ClassSetReservedDoublePunctuator] SourceCharacter but not ClassSetSyntaxCharacter
2562
+ // \ ClassSetReservedPunctuator
2563
+ // \b
2564
+ // For CharacterEscape:
2565
+ // \ CharacterEscape[+UnicodeMode]
2566
+ export type ClassSetCharacter = ClassSetCharacter_UnicodeCharacter | ClassSetCharacter_CharacterEscape;
2567
+ export interface ClassSetCharacter_UnicodeCharacter {
2568
+ readonly type: 'ClassSetCharacter';
2569
+ readonly production: 'UnicodeCharacter';
2570
+ readonly UnicodeCharacter: UnicodeCharacter;
2571
+ }
2572
+ export interface ClassSetCharacter_CharacterEscape {
2573
+ readonly type: 'ClassSetCharacter';
2574
+ readonly production: 'CharacterEscape';
2575
+ readonly CharacterEscape: CharacterEscape;
2576
+ }
2577
+
2578
+ // Not in RegExp section
2579
+ export interface HexEscapeSequence {
2580
+ readonly type: 'HexEscapeSequence';
2581
+ readonly HexDigit_a: string;
2582
+ readonly HexDigit_b: string;
2583
+ }
2584
+ }
2585
+
2586
+ export type ParseNode =
2587
+ | ParseNode.PrivateIdentifier
2588
+ | ParseNode.IdentifierName
2589
+ | ParseNode.IdentifierReference
2590
+ | ParseNode.BindingIdentifier
2591
+ | ParseNode.LabelIdentifier
2592
+ | ParseNode.PropertyName
2593
+ | ParseNode.ThisExpression
2594
+ | ParseNode.NullLiteral
2595
+ | ParseNode.BooleanLiteral
2596
+ | ParseNode.NumericLiteral
2597
+ | ParseNode.StringLiteral
2598
+ | ParseNode.Elision
2599
+ | ParseNode.ArrayLiteral
2600
+ | ParseNode.SpreadElement
2601
+ | ParseNode.ObjectLiteral
2602
+ | ParseNode.PropertyDefinition
2603
+ | ParseNode.CoverInitializedName
2604
+ | ParseNode.MethodDefinition
2605
+ | ParseNode.FunctionDeclaration
2606
+ | ParseNode.FunctionExpression
2607
+ | ParseNode.FunctionBody
2608
+ | ParseNode.ArrowFunction
2609
+ | ParseNode.ExpressionBody
2610
+ | ParseNode.ConciseBody
2611
+ | ParseNode.GeneratorDeclaration
2612
+ | ParseNode.GeneratorExpression
2613
+ | ParseNode.GeneratorMethod
2614
+ | ParseNode.GeneratorBody
2615
+ | ParseNode.YieldExpression
2616
+ | ParseNode.AsyncGeneratorDeclaration
2617
+ | ParseNode.AsyncGeneratorExpression
2618
+ | ParseNode.AsyncGeneratorMethod
2619
+ | ParseNode.AsyncGeneratorBody
2620
+ | ParseNode.ClassDeclaration
2621
+ | ParseNode.ClassExpression
2622
+ | ParseNode.ClassTail
2623
+ | ParseNode.FieldDefinition
2624
+ | ParseNode.ClassStaticBlock
2625
+ | ParseNode.ClassStaticBlockBody
2626
+ | ParseNode.AsyncFunctionDeclaration
2627
+ | ParseNode.AsyncFunctionExpression
2628
+ | ParseNode.AsyncMethod
2629
+ | ParseNode.AsyncBody
2630
+ | ParseNode.AsyncArrowFunction
2631
+ | ParseNode.AsyncConciseBody
2632
+ | ParseNode.RegularExpressionLiteral
2633
+ | ParseNode.CoverParenthesizedExpressionAndArrowParameterList
2634
+ | ParseNode.ParenthesizedExpression
2635
+ | ParseNode.SuperProperty
2636
+ | ParseNode.SuperProperty
2637
+ | ParseNode.NewTarget
2638
+ | ParseNode.ImportMeta
2639
+ | ParseNode.MemberExpression
2640
+ | ParseNode.NewExpression
2641
+ | ParseNode.SuperCall
2642
+ | ParseNode.ImportCall
2643
+ | ParseNode.CallExpression
2644
+ | ParseNode.TemplateLiteral
2645
+ | ParseNode.TaggedTemplateExpression
2646
+ | ParseNode.OptionalExpression
2647
+ | ParseNode.OptionalChain
2648
+ | ParseNode.AssignmentRestElement
2649
+ | ParseNode.UpdateExpression
2650
+ | ParseNode.AwaitExpression
2651
+ | ParseNode.UnaryExpression
2652
+ | ParseNode.ExponentiationExpression
2653
+ | ParseNode.MultiplicativeExpression
2654
+ | ParseNode.AdditiveExpression
2655
+ | ParseNode.ShiftExpression
2656
+ | ParseNode.RelationalExpression
2657
+ | ParseNode.EqualityExpression
2658
+ | ParseNode.BitwiseANDExpression
2659
+ | ParseNode.BitwiseXORExpression
2660
+ | ParseNode.BitwiseORExpression
2661
+ | ParseNode.LogicalANDExpression
2662
+ | ParseNode.LogicalORExpression
2663
+ | ParseNode.CoalesceExpression
2664
+ | ParseNode.ConditionalExpression
2665
+ | ParseNode.AssignmentExpression
2666
+ | ParseNode.CommaOperator
2667
+ | ParseNode.LexicalDeclaration
2668
+ | ParseNode.LexicalBinding
2669
+ | ParseNode.ObjectBindingPattern
2670
+ | ParseNode.ArrayBindingPattern
2671
+ | ParseNode.BindingRestProperty
2672
+ | ParseNode.BindingProperty
2673
+ | ParseNode.BindingRestElement
2674
+ | ParseNode.BindingElement
2675
+ | ParseNode.SingleNameBinding
2676
+ | ParseNode.Block
2677
+ | ParseNode.VariableStatement
2678
+ | ParseNode.VariableDeclaration
2679
+ | ParseNode.EmptyStatement
2680
+ | ParseNode.ExpressionStatement
2681
+ | ParseNode.IfStatement
2682
+ | ParseNode.DoWhileStatement
2683
+ | ParseNode.WhileStatement
2684
+ | ParseNode.ForStatement
2685
+ | ParseNode.ForInStatement
2686
+ | ParseNode.ForOfStatement
2687
+ | ParseNode.ForDeclaration
2688
+ | ParseNode.ForBinding
2689
+ | ParseNode.ForAwaitStatement
2690
+ | ParseNode.SwitchStatement
2691
+ | ParseNode.CaseBlock
2692
+ | ParseNode.CaseClause
2693
+ | ParseNode.DefaultClause
2694
+ | ParseNode.ContinueStatement
2695
+ | ParseNode.BreakStatement
2696
+ | ParseNode.ReturnStatement
2697
+ | ParseNode.WithStatement
2698
+ | ParseNode.LabelledStatement
2699
+ | ParseNode.ThrowStatement
2700
+ | ParseNode.TryStatement
2701
+ | ParseNode.Catch
2702
+ | ParseNode.DebuggerStatement
2703
+ | ParseNode.ImportDeclaration
2704
+ | ParseNode.ImportClause
2705
+ | ParseNode.ImportedDefaultBinding
2706
+ | ParseNode.NameSpaceImport
2707
+ | ParseNode.NamedImports
2708
+ | ParseNode.ImportSpecifier
2709
+ | ParseNode.WithClause
2710
+ | ParseNode.WithEntry
2711
+ | ParseNode.ExportDeclaration
2712
+ | ParseNode.ExportFromClause
2713
+ | ParseNode.NamedExports
2714
+ | ParseNode.ExportSpecifier
2715
+ | ParseNode.Script
2716
+ | ParseNode.ScriptBody
2717
+ | ParseNode.Module
2718
+ | ParseNode.ModuleBody;
2719
+
2720
+ /**
2721
+ * A type that contains a mapping of {@link ParseNode} type names to their corresponding {@link ParseNode} type.
2722
+ *
2723
+ * You can use `ParseNodesByType[T]` instead of a conditional type like `Extract<ParseNode, { type: T }>` which is often
2724
+ * more expensive and can complicate assignability checks.
2725
+ */
2726
+ export type ParseNodesByType = {
2727
+ [N in ParseNode as N['type']]: N;
2728
+ };