@sprucelabs/spruce-cli 17.1.31 → 17.1.34

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 (730) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/build/__tests__/testDirsAndFiles/mercury-types-package.json +1 -1
  3. package/build/features/event/actions/SetRemoteAction.js +3 -0
  4. package/build/features/event/actions/SetRemoteAction.js.map +1 -1
  5. package/package.json +34 -34
  6. package/src/__tests__/testDirsAndFiles/mercury-types-package.json +1 -1
  7. package/src/features/event/actions/SetRemoteAction.ts +4 -0
  8. package/node_modules/@typescript-eslint/parser/LICENSE +0 -22
  9. package/node_modules/@typescript-eslint/parser/README.md +0 -302
  10. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +0 -4
  11. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +0 -20
  12. package/node_modules/@typescript-eslint/parser/dist/index.d.ts +0 -4
  13. package/node_modules/@typescript-eslint/parser/dist/index.d.ts.map +0 -1
  14. package/node_modules/@typescript-eslint/parser/dist/index.js +0 -13
  15. package/node_modules/@typescript-eslint/parser/dist/index.js.map +0 -1
  16. package/node_modules/@typescript-eslint/parser/dist/parser.d.ts +0 -17
  17. package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +0 -1
  18. package/node_modules/@typescript-eslint/parser/dist/parser.js +0 -129
  19. package/node_modules/@typescript-eslint/parser/dist/parser.js.map +0 -1
  20. package/node_modules/@typescript-eslint/parser/package.json +0 -75
  21. package/node_modules/@typescript-eslint/scope-manager/LICENSE +0 -21
  22. package/node_modules/@typescript-eslint/scope-manager/README.md +0 -120
  23. package/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts +0 -4
  24. package/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map +0 -1
  25. package/node_modules/@typescript-eslint/scope-manager/dist/ID.js +0 -22
  26. package/node_modules/@typescript-eslint/scope-manager/dist/ID.js.map +0 -1
  27. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts +0 -72
  28. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map +0 -1
  29. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +0 -183
  30. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +0 -1
  31. package/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts +0 -62
  32. package/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map +0 -1
  33. package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js +0 -58
  34. package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js.map +0 -1
  35. package/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts +0 -3
  36. package/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map +0 -1
  37. package/node_modules/@typescript-eslint/scope-manager/dist/assert.js +0 -11
  38. package/node_modules/@typescript-eslint/scope-manager/dist/assert.js.map +0 -1
  39. package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts +0 -10
  40. package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map +0 -1
  41. package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js +0 -14
  42. package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js.map +0 -1
  43. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts +0 -10
  44. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map +0 -1
  45. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js +0 -14
  46. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js.map +0 -1
  47. package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts +0 -14
  48. package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map +0 -1
  49. package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js +0 -3
  50. package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js.map +0 -1
  51. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts +0 -39
  52. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map +0 -1
  53. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js +0 -19
  54. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js.map +0 -1
  55. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts +0 -15
  56. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map +0 -1
  57. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js +0 -19
  58. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js.map +0 -1
  59. package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts +0 -10
  60. package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map +0 -1
  61. package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js +0 -14
  62. package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js.map +0 -1
  63. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts +0 -10
  64. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map +0 -1
  65. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js +0 -14
  66. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js.map +0 -1
  67. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts +0 -11
  68. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map +0 -1
  69. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js +0 -14
  70. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js.map +0 -1
  71. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts +0 -14
  72. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map +0 -1
  73. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js +0 -15
  74. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js.map +0 -1
  75. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts +0 -10
  76. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map +0 -1
  77. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js +0 -14
  78. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js.map +0 -1
  79. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts +0 -10
  80. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map +0 -1
  81. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js +0 -14
  82. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js.map +0 -1
  83. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts +0 -10
  84. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map +0 -1
  85. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js +0 -14
  86. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js.map +0 -1
  87. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts +0 -10
  88. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map +0 -1
  89. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js +0 -14
  90. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js.map +0 -1
  91. package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts +0 -10
  92. package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map +0 -1
  93. package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js +0 -14
  94. package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js.map +0 -1
  95. package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts +0 -14
  96. package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map +0 -1
  97. package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js +0 -30
  98. package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js.map +0 -1
  99. package/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts +0 -9
  100. package/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map +0 -1
  101. package/node_modules/@typescript-eslint/scope-manager/dist/index.js +0 -31
  102. package/node_modules/@typescript-eslint/scope-manager/dist/index.js.map +0 -1
  103. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts +0 -16
  104. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map +0 -1
  105. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js +0 -23
  106. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js.map +0 -1
  107. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts +0 -3
  108. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +0 -1
  109. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts +0 -3
  110. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +0 -1
  111. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +0 -69
  112. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +0 -1
  113. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +0 -1298
  114. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +0 -1
  115. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts +0 -3
  116. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map +0 -1
  117. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js +0 -21
  118. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js.map +0 -1
  119. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts +0 -3
  120. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map +0 -1
  121. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js +0 -23
  122. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js.map +0 -1
  123. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts +0 -3
  124. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map +0 -1
  125. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts +0 -3
  126. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map +0 -1
  127. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js +0 -11
  128. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js.map +0 -1
  129. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts +0 -3
  130. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map +0 -1
  131. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js +0 -11
  132. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js.map +0 -1
  133. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js +0 -19
  134. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js.map +0 -1
  135. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts +0 -3
  136. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map +0 -1
  137. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js +0 -12
  138. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js.map +0 -1
  139. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts +0 -3
  140. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map +0 -1
  141. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js +0 -13
  142. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js.map +0 -1
  143. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts +0 -3
  144. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map +0 -1
  145. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js +0 -12
  146. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js.map +0 -1
  147. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts +0 -3
  148. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map +0 -1
  149. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js +0 -12
  150. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js.map +0 -1
  151. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts +0 -3
  152. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map +0 -1
  153. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +0 -11
  154. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map +0 -1
  155. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts +0 -3
  156. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map +0 -1
  157. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js +0 -22
  158. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js.map +0 -1
  159. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts +0 -3
  160. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map +0 -1
  161. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts +0 -3
  162. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map +0 -1
  163. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js +0 -14
  164. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js.map +0 -1
  165. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js +0 -11
  166. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js.map +0 -1
  167. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts +0 -3
  168. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map +0 -1
  169. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts +0 -3
  170. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map +0 -1
  171. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js +0 -14
  172. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js.map +0 -1
  173. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts +0 -3
  174. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map +0 -1
  175. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js +0 -12
  176. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js.map +0 -1
  177. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js +0 -15
  178. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js.map +0 -1
  179. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts +0 -3
  180. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map +0 -1
  181. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js +0 -12
  182. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js.map +0 -1
  183. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts +0 -3
  184. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map +0 -1
  185. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js +0 -12
  186. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js.map +0 -1
  187. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts +0 -3
  188. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map +0 -1
  189. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js +0 -12
  190. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js.map +0 -1
  191. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts +0 -3
  192. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map +0 -1
  193. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js +0 -20
  194. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js.map +0 -1
  195. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts +0 -3
  196. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map +0 -1
  197. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js +0 -11
  198. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js.map +0 -1
  199. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts +0 -3
  200. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map +0 -1
  201. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js +0 -12
  202. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js.map +0 -1
  203. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts +0 -3
  204. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map +0 -1
  205. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts +0 -3
  206. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map +0 -1
  207. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js +0 -14
  208. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js.map +0 -1
  209. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts +0 -3
  210. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map +0 -1
  211. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js +0 -12
  212. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js.map +0 -1
  213. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js +0 -15
  214. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js.map +0 -1
  215. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts +0 -3
  216. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map +0 -1
  217. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js +0 -12
  218. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js.map +0 -1
  219. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts +0 -3
  220. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map +0 -1
  221. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js +0 -14
  222. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js.map +0 -1
  223. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts +0 -3
  224. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map +0 -1
  225. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js +0 -14
  226. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js.map +0 -1
  227. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts +0 -3
  228. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map +0 -1
  229. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts +0 -3
  230. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map +0 -1
  231. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js +0 -14
  232. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js.map +0 -1
  233. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +0 -14
  234. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map +0 -1
  235. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts +0 -3
  236. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map +0 -1
  237. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js +0 -11
  238. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js.map +0 -1
  239. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts +0 -3
  240. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map +0 -1
  241. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js +0 -12
  242. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js.map +0 -1
  243. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts +0 -3
  244. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map +0 -1
  245. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js +0 -12
  246. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js.map +0 -1
  247. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts +0 -3
  248. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map +0 -1
  249. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +0 -11
  250. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map +0 -1
  251. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts +0 -3
  252. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map +0 -1
  253. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts +0 -3
  254. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map +0 -1
  255. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +0 -11
  256. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map +0 -1
  257. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts +0 -3
  258. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map +0 -1
  259. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js +0 -14
  260. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js.map +0 -1
  261. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts +0 -3
  262. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map +0 -1
  263. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js +0 -12
  264. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map +0 -1
  265. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +0 -18
  266. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map +0 -1
  267. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts +0 -3
  268. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map +0 -1
  269. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +0 -11
  270. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map +0 -1
  271. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts +0 -3
  272. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map +0 -1
  273. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js +0 -15
  274. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js.map +0 -1
  275. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts +0 -3
  276. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map +0 -1
  277. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js +0 -12
  278. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js.map +0 -1
  279. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts +0 -3
  280. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map +0 -1
  281. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js +0 -11
  282. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js.map +0 -1
  283. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts +0 -3
  284. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map +0 -1
  285. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js +0 -12
  286. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js.map +0 -1
  287. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts +0 -3
  288. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map +0 -1
  289. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts +0 -3
  290. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map +0 -1
  291. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js +0 -14
  292. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js.map +0 -1
  293. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts +0 -3
  294. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map +0 -1
  295. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js +0 -12
  296. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js.map +0 -1
  297. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js +0 -14
  298. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js.map +0 -1
  299. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts +0 -3
  300. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map +0 -1
  301. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js +0 -14
  302. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js.map +0 -1
  303. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts +0 -3
  304. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map +0 -1
  305. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js +0 -12
  306. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js.map +0 -1
  307. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts +0 -3
  308. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map +0 -1
  309. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js +0 -15
  310. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js.map +0 -1
  311. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts +0 -3
  312. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map +0 -1
  313. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js +0 -24
  314. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js.map +0 -1
  315. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts +0 -3
  316. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +0 -1
  317. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts +0 -3
  318. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map +0 -1
  319. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js +0 -21
  320. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js.map +0 -1
  321. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts +0 -3
  322. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map +0 -1
  323. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js +0 -14
  324. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js.map +0 -1
  325. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +0 -14
  326. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +0 -1
  327. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts +0 -3
  328. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map +0 -1
  329. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +0 -12
  330. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map +0 -1
  331. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts +0 -3
  332. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map +0 -1
  333. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js +0 -12
  334. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js.map +0 -1
  335. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts +0 -3
  336. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map +0 -1
  337. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +0 -114
  338. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map +0 -1
  339. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts +0 -3
  340. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map +0 -1
  341. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js +0 -19
  342. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js.map +0 -1
  343. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts +0 -3
  344. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map +0 -1
  345. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js +0 -11
  346. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js.map +0 -1
  347. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts +0 -3
  348. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map +0 -1
  349. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js +0 -24
  350. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js.map +0 -1
  351. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts +0 -3
  352. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map +0 -1
  353. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js +0 -12
  354. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js.map +0 -1
  355. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts +0 -3
  356. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map +0 -1
  357. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +0 -11
  358. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map +0 -1
  359. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts +0 -3
  360. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map +0 -1
  361. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts +0 -3
  362. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map +0 -1
  363. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js +0 -14
  364. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js.map +0 -1
  365. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts +0 -3
  366. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map +0 -1
  367. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js +0 -12
  368. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js.map +0 -1
  369. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +0 -11
  370. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js.map +0 -1
  371. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts +0 -3
  372. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map +0 -1
  373. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js +0 -14
  374. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js.map +0 -1
  375. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts +0 -3
  376. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map +0 -1
  377. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js +0 -12
  378. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js.map +0 -1
  379. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts +0 -3
  380. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map +0 -1
  381. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js +0 -12
  382. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js.map +0 -1
  383. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts +0 -3
  384. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map +0 -1
  385. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js +0 -15
  386. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js.map +0 -1
  387. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +0 -79
  388. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +0 -1
  389. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +0 -161
  390. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +0 -1
  391. package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts +0 -3
  392. package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map +0 -1
  393. package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js +0 -13
  394. package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js.map +0 -1
  395. package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts +0 -3
  396. package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map +0 -1
  397. package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js +0 -24
  398. package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js.map +0 -1
  399. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts +0 -3
  400. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +0 -1
  401. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts +0 -3
  402. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map +0 -1
  403. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js +0 -9
  404. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js.map +0 -1
  405. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts +0 -3
  406. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map +0 -1
  407. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +0 -28
  408. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map +0 -1
  409. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +0 -452
  410. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +0 -1
  411. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +0 -26
  412. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +0 -1
  413. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +0 -316
  414. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +0 -1
  415. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts +0 -15
  416. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map +0 -1
  417. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js +0 -84
  418. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map +0 -1
  419. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts +0 -14
  420. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map +0 -1
  421. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js +0 -50
  422. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map +0 -1
  423. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts +0 -28
  424. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +0 -1
  425. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +0 -111
  426. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +0 -1
  427. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts +0 -89
  428. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map +0 -1
  429. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +0 -109
  430. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map +0 -1
  431. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +0 -84
  432. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +0 -1
  433. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +0 -544
  434. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +0 -1
  435. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts +0 -33
  436. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +0 -1
  437. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +0 -228
  438. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +0 -1
  439. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts +0 -13
  440. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map +0 -1
  441. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js +0 -41
  442. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map +0 -1
  443. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts +0 -22
  444. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map +0 -1
  445. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js +0 -82
  446. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map +0 -1
  447. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts +0 -2
  448. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map +0 -1
  449. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js +0 -6
  450. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js.map +0 -1
  451. package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts +0 -10
  452. package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map +0 -1
  453. package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js +0 -12
  454. package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js.map +0 -1
  455. package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts +0 -10
  456. package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map +0 -1
  457. package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js +0 -12
  458. package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js.map +0 -1
  459. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts +0 -10
  460. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map +0 -1
  461. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js +0 -12
  462. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js.map +0 -1
  463. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts +0 -10
  464. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map +0 -1
  465. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js +0 -12
  466. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js.map +0 -1
  467. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +0 -10
  468. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +0 -1
  469. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js +0 -12
  470. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js.map +0 -1
  471. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts +0 -10
  472. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map +0 -1
  473. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js +0 -12
  474. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js.map +0 -1
  475. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts +0 -10
  476. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map +0 -1
  477. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js +0 -12
  478. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js.map +0 -1
  479. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts +0 -11
  480. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map +0 -1
  481. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js +0 -17
  482. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js.map +0 -1
  483. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts +0 -13
  484. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map +0 -1
  485. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +0 -37
  486. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js.map +0 -1
  487. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts +0 -10
  488. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map +0 -1
  489. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js +0 -12
  490. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js.map +0 -1
  491. package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts +0 -18
  492. package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map +0 -1
  493. package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js +0 -39
  494. package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js.map +0 -1
  495. package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts +0 -10
  496. package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map +0 -1
  497. package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js +0 -12
  498. package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js.map +0 -1
  499. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts +0 -10
  500. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map +0 -1
  501. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js +0 -12
  502. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js.map +0 -1
  503. package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts +0 -21
  504. package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map +0 -1
  505. package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js +0 -3
  506. package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js.map +0 -1
  507. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts +0 -106
  508. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map +0 -1
  509. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js +0 -363
  510. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map +0 -1
  511. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts +0 -22
  512. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map +0 -1
  513. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js +0 -26
  514. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js.map +0 -1
  515. package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts +0 -10
  516. package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map +0 -1
  517. package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js +0 -12
  518. package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js.map +0 -1
  519. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts +0 -10
  520. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map +0 -1
  521. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js +0 -12
  522. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js.map +0 -1
  523. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts +0 -10
  524. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map +0 -1
  525. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js +0 -12
  526. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js.map +0 -1
  527. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts +0 -10
  528. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map +0 -1
  529. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js +0 -12
  530. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js.map +0 -1
  531. package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts +0 -11
  532. package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map +0 -1
  533. package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js +0 -22
  534. package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js.map +0 -1
  535. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts +0 -20
  536. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map +0 -1
  537. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +0 -36
  538. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js.map +0 -1
  539. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts +0 -34
  540. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map +0 -1
  541. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js +0 -12
  542. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js.map +0 -1
  543. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts +0 -25
  544. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map +0 -1
  545. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js +0 -19
  546. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js.map +0 -1
  547. package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts +0 -18
  548. package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map +0 -1
  549. package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js +0 -33
  550. package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js.map +0 -1
  551. package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts +0 -44
  552. package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map +0 -1
  553. package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js +0 -39
  554. package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js.map +0 -1
  555. package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts +0 -4
  556. package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map +0 -1
  557. package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js +0 -10
  558. package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js.map +0 -1
  559. package/node_modules/@typescript-eslint/scope-manager/package.json +0 -67
  560. package/node_modules/@typescript-eslint/types/LICENSE +0 -21
  561. package/node_modules/@typescript-eslint/types/README.md +0 -17
  562. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +0 -1732
  563. package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +0 -5
  564. package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +0 -3
  565. package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +0 -35
  566. package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +0 -9
  567. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +0 -1729
  568. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +0 -1
  569. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +0 -199
  570. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +0 -1
  571. package/node_modules/@typescript-eslint/types/dist/index.d.ts +0 -5
  572. package/node_modules/@typescript-eslint/types/dist/index.d.ts.map +0 -1
  573. package/node_modules/@typescript-eslint/types/dist/index.js +0 -24
  574. package/node_modules/@typescript-eslint/types/dist/index.js.map +0 -1
  575. package/node_modules/@typescript-eslint/types/dist/lib.d.ts +0 -3
  576. package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +0 -1
  577. package/node_modules/@typescript-eslint/types/dist/lib.js +0 -7
  578. package/node_modules/@typescript-eslint/types/dist/lib.js.map +0 -1
  579. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +0 -35
  580. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +0 -1
  581. package/node_modules/@typescript-eslint/types/dist/parser-options.js +0 -3
  582. package/node_modules/@typescript-eslint/types/dist/parser-options.js.map +0 -1
  583. package/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts +0 -8
  584. package/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map +0 -1
  585. package/node_modules/@typescript-eslint/types/dist/ts-estree.js +0 -28
  586. package/node_modules/@typescript-eslint/types/dist/ts-estree.js.map +0 -1
  587. package/node_modules/@typescript-eslint/types/package.json +0 -84
  588. package/node_modules/@typescript-eslint/typescript-estree/LICENSE +0 -26
  589. package/node_modules/@typescript-eslint/typescript-estree/README.md +0 -383
  590. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +0 -9
  591. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +0 -11
  592. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +0 -157
  593. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +0 -13
  594. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +0 -12
  595. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +0 -9
  596. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +0 -11
  597. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +0 -5
  598. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +0 -19
  599. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +0 -5
  600. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +0 -22
  601. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +0 -13
  602. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +0 -10
  603. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +0 -2
  604. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +0 -230
  605. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +0 -188
  606. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +0 -25
  607. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +0 -13
  608. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +0 -9
  609. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +0 -175
  610. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +0 -4
  611. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +0 -18
  612. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +0 -3
  613. package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts +0 -9
  614. package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map +0 -1
  615. package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +0 -60
  616. package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map +0 -1
  617. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts +0 -11
  618. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map +0 -1
  619. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +0 -63
  620. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +0 -1
  621. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts +0 -157
  622. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +0 -1
  623. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +0 -2323
  624. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +0 -1
  625. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +0 -13
  626. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map +0 -1
  627. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js +0 -6
  628. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js.map +0 -1
  629. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts +0 -12
  630. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +0 -1
  631. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +0 -66
  632. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +0 -1
  633. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts +0 -9
  634. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map +0 -1
  635. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +0 -83
  636. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map +0 -1
  637. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts +0 -11
  638. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +0 -1
  639. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +0 -94
  640. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +0 -1
  641. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts +0 -5
  642. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map +0 -1
  643. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +0 -40
  644. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map +0 -1
  645. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts +0 -19
  646. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +0 -1
  647. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js +0 -414
  648. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +0 -1
  649. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts +0 -5
  650. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map +0 -1
  651. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +0 -72
  652. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map +0 -1
  653. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +0 -22
  654. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +0 -1
  655. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +0 -116
  656. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +0 -1
  657. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts +0 -13
  658. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map +0 -1
  659. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +0 -93
  660. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map +0 -1
  661. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +0 -10
  662. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +0 -1
  663. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +0 -37
  664. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +0 -1
  665. package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts +0 -2
  666. package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map +0 -1
  667. package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js +0 -259
  668. package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js.map +0 -1
  669. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts +0 -227
  670. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +0 -1
  671. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +0 -582
  672. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +0 -1
  673. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +0 -188
  674. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +0 -1
  675. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js +0 -3
  676. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js.map +0 -1
  677. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts +0 -25
  678. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +0 -1
  679. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +0 -529
  680. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +0 -1
  681. package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts +0 -13
  682. package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map +0 -1
  683. package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js +0 -93
  684. package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js.map +0 -1
  685. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts +0 -9
  686. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map +0 -1
  687. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +0 -54
  688. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +0 -1
  689. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +0 -175
  690. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +0 -1
  691. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js +0 -4
  692. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js.map +0 -1
  693. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts +0 -4
  694. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map +0 -1
  695. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js +0 -25
  696. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js.map +0 -1
  697. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts +0 -18
  698. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map +0 -1
  699. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js +0 -3
  700. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js.map +0 -1
  701. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts +0 -3
  702. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map +0 -1
  703. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +0 -46
  704. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +0 -1
  705. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/gitignore.js +0 -120
  706. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.d.ts +0 -186
  707. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/index.js +0 -181
  708. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/license +0 -9
  709. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/package.json +0 -82
  710. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/readme.md +0 -170
  711. package/node_modules/@typescript-eslint/typescript-estree/node_modules/globby/stream-utils.js +0 -46
  712. package/node_modules/@typescript-eslint/typescript-estree/package.json +0 -86
  713. package/node_modules/@typescript-eslint/visitor-keys/LICENSE +0 -21
  714. package/node_modules/@typescript-eslint/visitor-keys/README.md +0 -13
  715. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +0 -4
  716. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +0 -3
  717. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +0 -6
  718. package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts +0 -4
  719. package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map +0 -1
  720. package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js +0 -7
  721. package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js.map +0 -1
  722. package/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts +0 -3
  723. package/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map +0 -1
  724. package/node_modules/@typescript-eslint/visitor-keys/dist/index.js +0 -8
  725. package/node_modules/@typescript-eslint/visitor-keys/dist/index.js.map +0 -1
  726. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts +0 -6
  727. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +0 -1
  728. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +0 -160
  729. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +0 -1
  730. package/node_modules/@typescript-eslint/visitor-keys/package.json +0 -60
@@ -1,2323 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Converter = exports.convertError = void 0;
27
- // There's lots of funny stuff due to the typing of ts.Node
28
- /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */
29
- const ts = __importStar(require("typescript"));
30
- const node_utils_1 = require("./node-utils");
31
- const ts_estree_1 = require("./ts-estree");
32
- const version_check_1 = require("./version-check");
33
- const SyntaxKind = ts.SyntaxKind;
34
- /**
35
- * Extends and formats a given error object
36
- * @param error the error object
37
- * @returns converted error object
38
- */
39
- function convertError(error) {
40
- return (0, node_utils_1.createError)(error.file, error.start, ('message' in error && error.message) || error.messageText);
41
- }
42
- exports.convertError = convertError;
43
- class Converter {
44
- /**
45
- * Converts a TypeScript node into an ESTree node
46
- * @param ast the full TypeScript AST
47
- * @param options additional options for the conversion
48
- * @returns the converted ESTreeNode
49
- */
50
- constructor(ast, options) {
51
- this.esTreeNodeToTSNodeMap = new WeakMap();
52
- this.tsNodeToESTreeNodeMap = new WeakMap();
53
- this.allowPattern = false;
54
- this.inTypeMode = false;
55
- this.ast = ast;
56
- this.options = Object.assign({}, options);
57
- }
58
- getASTMaps() {
59
- return {
60
- esTreeNodeToTSNodeMap: this.esTreeNodeToTSNodeMap,
61
- tsNodeToESTreeNodeMap: this.tsNodeToESTreeNodeMap,
62
- };
63
- }
64
- convertProgram() {
65
- return this.converter(this.ast);
66
- }
67
- /**
68
- * Converts a TypeScript node into an ESTree node.
69
- * @param node the child ts.Node
70
- * @param parent parentNode
71
- * @param inTypeMode flag to determine if we are in typeMode
72
- * @param allowPattern flag to determine if patterns are allowed
73
- * @returns the converted ESTree node
74
- */
75
- converter(node, parent, inTypeMode, allowPattern) {
76
- /**
77
- * Exit early for null and undefined
78
- */
79
- if (!node) {
80
- return null;
81
- }
82
- const typeMode = this.inTypeMode;
83
- const pattern = this.allowPattern;
84
- if (inTypeMode !== undefined) {
85
- this.inTypeMode = inTypeMode;
86
- }
87
- if (allowPattern !== undefined) {
88
- this.allowPattern = allowPattern;
89
- }
90
- const result = this.convertNode(node, (parent !== null && parent !== void 0 ? parent : node.parent));
91
- this.registerTSNodeInNodeMap(node, result);
92
- this.inTypeMode = typeMode;
93
- this.allowPattern = pattern;
94
- return result;
95
- }
96
- /**
97
- * Fixes the exports of the given ts.Node
98
- * @param node the ts.Node
99
- * @param result result
100
- * @returns the ESTreeNode with fixed exports
101
- */
102
- fixExports(node, result) {
103
- // check for exports
104
- if (node.modifiers && node.modifiers[0].kind === SyntaxKind.ExportKeyword) {
105
- /**
106
- * Make sure that original node is registered instead of export
107
- */
108
- this.registerTSNodeInNodeMap(node, result);
109
- const exportKeyword = node.modifiers[0];
110
- const nextModifier = node.modifiers[1];
111
- const declarationIsDefault = nextModifier && nextModifier.kind === SyntaxKind.DefaultKeyword;
112
- const varToken = declarationIsDefault
113
- ? (0, node_utils_1.findNextToken)(nextModifier, this.ast, this.ast)
114
- : (0, node_utils_1.findNextToken)(exportKeyword, this.ast, this.ast);
115
- result.range[0] = varToken.getStart(this.ast);
116
- result.loc = (0, node_utils_1.getLocFor)(result.range[0], result.range[1], this.ast);
117
- if (declarationIsDefault) {
118
- return this.createNode(node, {
119
- type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
120
- declaration: result,
121
- range: [exportKeyword.getStart(this.ast), result.range[1]],
122
- exportKind: 'value',
123
- });
124
- }
125
- else {
126
- const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
127
- result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
128
- const isDeclare = 'declare' in result && result.declare === true;
129
- return this.createNode(node, {
130
- type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
131
- // @ts-expect-error - TODO, narrow the types here
132
- declaration: result,
133
- specifiers: [],
134
- source: null,
135
- exportKind: isType || isDeclare ? 'type' : 'value',
136
- range: [exportKeyword.getStart(this.ast), result.range[1]],
137
- assertions: [],
138
- });
139
- }
140
- }
141
- return result;
142
- }
143
- /**
144
- * Register specific TypeScript node into map with first ESTree node provided
145
- */
146
- registerTSNodeInNodeMap(node, result) {
147
- if (result && this.options.shouldPreserveNodeMaps) {
148
- if (!this.tsNodeToESTreeNodeMap.has(node)) {
149
- this.tsNodeToESTreeNodeMap.set(node, result);
150
- }
151
- }
152
- }
153
- /**
154
- * Converts a TypeScript node into an ESTree node.
155
- * @param child the child ts.Node
156
- * @param parent parentNode
157
- * @returns the converted ESTree node
158
- */
159
- convertPattern(child, parent) {
160
- return this.converter(child, parent, this.inTypeMode, true);
161
- }
162
- /**
163
- * Converts a TypeScript node into an ESTree node.
164
- * @param child the child ts.Node
165
- * @param parent parentNode
166
- * @returns the converted ESTree node
167
- */
168
- convertChild(child, parent) {
169
- return this.converter(child, parent, this.inTypeMode, false);
170
- }
171
- /**
172
- * Converts a TypeScript node into an ESTree node.
173
- * @param child the child ts.Node
174
- * @param parent parentNode
175
- * @returns the converted ESTree node
176
- */
177
- convertType(child, parent) {
178
- return this.converter(child, parent, true, false);
179
- }
180
- createNode(node, data) {
181
- const result = data;
182
- if (!result.range) {
183
- result.range = (0, node_utils_1.getRange)(
184
- // this is completely valid, but TS hates it
185
- node, this.ast);
186
- }
187
- if (!result.loc) {
188
- result.loc = (0, node_utils_1.getLocFor)(result.range[0], result.range[1], this.ast);
189
- }
190
- if (result && this.options.shouldPreserveNodeMaps) {
191
- this.esTreeNodeToTSNodeMap.set(result, node);
192
- }
193
- return result;
194
- }
195
- convertBindingNameWithTypeAnnotation(name, tsType, parent) {
196
- const id = this.convertPattern(name);
197
- if (tsType) {
198
- id.typeAnnotation = this.convertTypeAnnotation(tsType, parent);
199
- this.fixParentLocation(id, id.typeAnnotation.range);
200
- }
201
- return id;
202
- }
203
- /**
204
- * Converts a child into a type annotation. This creates an intermediary
205
- * TypeAnnotation node to match what Flow does.
206
- * @param child The TypeScript AST node to convert.
207
- * @param parent parentNode
208
- * @returns The type annotation node.
209
- */
210
- convertTypeAnnotation(child, parent) {
211
- // in FunctionType and ConstructorType typeAnnotation has 2 characters `=>` and in other places is just colon
212
- const offset = (parent === null || parent === void 0 ? void 0 : parent.kind) === SyntaxKind.FunctionType ||
213
- (parent === null || parent === void 0 ? void 0 : parent.kind) === SyntaxKind.ConstructorType
214
- ? 2
215
- : 1;
216
- const annotationStartCol = child.getFullStart() - offset;
217
- const loc = (0, node_utils_1.getLocFor)(annotationStartCol, child.end, this.ast);
218
- return {
219
- type: ts_estree_1.AST_NODE_TYPES.TSTypeAnnotation,
220
- loc,
221
- range: [annotationStartCol, child.end],
222
- typeAnnotation: this.convertType(child),
223
- };
224
- }
225
- /**
226
- * Coverts body Nodes and add a directive field to StringLiterals
227
- * @param nodes of ts.Node
228
- * @param parent parentNode
229
- * @returns Array of body statements
230
- */
231
- convertBodyExpressions(nodes, parent) {
232
- let allowDirectives = (0, node_utils_1.canContainDirective)(parent);
233
- return (nodes
234
- .map(statement => {
235
- const child = this.convertChild(statement);
236
- if (allowDirectives) {
237
- if ((child === null || child === void 0 ? void 0 : child.expression) &&
238
- ts.isExpressionStatement(statement) &&
239
- ts.isStringLiteral(statement.expression)) {
240
- const raw = child.expression.raw;
241
- child.directive = raw.slice(1, -1);
242
- return child; // child can be null, but it's filtered below
243
- }
244
- else {
245
- allowDirectives = false;
246
- }
247
- }
248
- return child; // child can be null, but it's filtered below
249
- })
250
- // filter out unknown nodes for now
251
- .filter(statement => statement));
252
- }
253
- /**
254
- * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node
255
- * @param typeArguments ts.NodeArray typeArguments
256
- * @param node parent used to create this node
257
- * @returns TypeParameterInstantiation node
258
- */
259
- convertTypeArgumentsToTypeParameters(typeArguments, node) {
260
- const greaterThanToken = (0, node_utils_1.findNextToken)(typeArguments, this.ast, this.ast);
261
- return this.createNode(node, {
262
- type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterInstantiation,
263
- range: [typeArguments.pos - 1, greaterThanToken.end],
264
- params: typeArguments.map(typeArgument => this.convertType(typeArgument)),
265
- });
266
- }
267
- /**
268
- * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node
269
- * @param typeParameters ts.Node typeParameters
270
- * @returns TypeParameterDeclaration node
271
- */
272
- convertTSTypeParametersToTypeParametersDeclaration(typeParameters) {
273
- const greaterThanToken = (0, node_utils_1.findNextToken)(typeParameters, this.ast, this.ast);
274
- return {
275
- type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterDeclaration,
276
- range: [typeParameters.pos - 1, greaterThanToken.end],
277
- loc: (0, node_utils_1.getLocFor)(typeParameters.pos - 1, greaterThanToken.end, this.ast),
278
- params: typeParameters.map(typeParameter => this.convertType(typeParameter)),
279
- };
280
- }
281
- /**
282
- * Converts an array of ts.Node parameters into an array of ESTreeNode params
283
- * @param parameters An array of ts.Node params to be converted
284
- * @returns an array of converted ESTreeNode params
285
- */
286
- convertParameters(parameters) {
287
- if (!parameters || !parameters.length) {
288
- return [];
289
- }
290
- return parameters.map(param => {
291
- var _a;
292
- const convertedParam = this.convertChild(param);
293
- if ((_a = param.decorators) === null || _a === void 0 ? void 0 : _a.length) {
294
- convertedParam.decorators = param.decorators.map(el => this.convertChild(el));
295
- }
296
- return convertedParam;
297
- });
298
- }
299
- convertChainExpression(node, tsNode) {
300
- const { child, isOptional } = (() => {
301
- if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) {
302
- return { child: node.object, isOptional: node.optional };
303
- }
304
- if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) {
305
- return { child: node.callee, isOptional: node.optional };
306
- }
307
- return { child: node.expression, isOptional: false };
308
- })();
309
- const isChildUnwrappable = (0, node_utils_1.isChildUnwrappableOptionalChain)(tsNode, child);
310
- if (!isChildUnwrappable && !isOptional) {
311
- return node;
312
- }
313
- if (isChildUnwrappable && (0, node_utils_1.isChainExpression)(child)) {
314
- // unwrap the chain expression child
315
- const newChild = child.expression;
316
- if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) {
317
- node.object = newChild;
318
- }
319
- else if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) {
320
- node.callee = newChild;
321
- }
322
- else {
323
- node.expression = newChild;
324
- }
325
- }
326
- return this.createNode(tsNode, {
327
- type: ts_estree_1.AST_NODE_TYPES.ChainExpression,
328
- expression: node,
329
- });
330
- }
331
- /**
332
- * For nodes that are copied directly from the TypeScript AST into
333
- * ESTree mostly as-is. The only difference is the addition of a type
334
- * property instead of a kind property. Recursively copies all children.
335
- */
336
- deeplyCopy(node) {
337
- if (node.kind === ts.SyntaxKind.JSDocFunctionType) {
338
- throw (0, node_utils_1.createError)(this.ast, node.pos, 'JSDoc types can only be used inside documentation comments.');
339
- }
340
- const customType = `TS${SyntaxKind[node.kind]}`;
341
- /**
342
- * If the "errorOnUnknownASTType" option is set to true, throw an error,
343
- * otherwise fallback to just including the unknown type as-is.
344
- */
345
- if (this.options.errorOnUnknownASTType && !ts_estree_1.AST_NODE_TYPES[customType]) {
346
- throw new Error(`Unknown AST_NODE_TYPE: "${customType}"`);
347
- }
348
- const result = this.createNode(node, {
349
- type: customType,
350
- });
351
- if ('type' in node) {
352
- result.typeAnnotation =
353
- node.type && 'kind' in node.type && ts.isTypeNode(node.type)
354
- ? this.convertTypeAnnotation(node.type, node)
355
- : null;
356
- }
357
- if ('typeArguments' in node) {
358
- result.typeParameters =
359
- node.typeArguments && 'pos' in node.typeArguments
360
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
361
- : null;
362
- }
363
- if ('typeParameters' in node) {
364
- result.typeParameters =
365
- node.typeParameters && 'pos' in node.typeParameters
366
- ? this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters)
367
- : null;
368
- }
369
- if ('decorators' in node && node.decorators && node.decorators.length) {
370
- result.decorators = node.decorators.map(el => this.convertChild(el));
371
- }
372
- Object.entries(node)
373
- .filter(([key]) => !/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc|type|typeArguments|typeParameters|decorators|transformFlags)$/.test(key))
374
- .forEach(([key, value]) => {
375
- if (Array.isArray(value)) {
376
- result[key] = value.map(el => this.convertChild(el));
377
- }
378
- else if (value && typeof value === 'object' && value.kind) {
379
- // need to check node[key].kind to ensure we don't try to convert a symbol
380
- result[key] = this.convertChild(value);
381
- }
382
- else {
383
- result[key] = value;
384
- }
385
- });
386
- return result;
387
- }
388
- convertJSXIdentifier(node) {
389
- const result = this.createNode(node, {
390
- type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier,
391
- name: node.getText(),
392
- });
393
- this.registerTSNodeInNodeMap(node, result);
394
- return result;
395
- }
396
- convertJSXNamespaceOrIdentifier(node) {
397
- const text = node.getText();
398
- const colonIndex = text.indexOf(':');
399
- // this is intentional we can ignore conversion if `:` is in first character
400
- if (colonIndex > 0) {
401
- const range = (0, node_utils_1.getRange)(node, this.ast);
402
- const result = this.createNode(node, {
403
- type: ts_estree_1.AST_NODE_TYPES.JSXNamespacedName,
404
- namespace: this.createNode(node, {
405
- type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier,
406
- name: text.slice(0, colonIndex),
407
- range: [range[0], range[0] + colonIndex],
408
- }),
409
- name: this.createNode(node, {
410
- type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier,
411
- name: text.slice(colonIndex + 1),
412
- range: [range[0] + colonIndex + 1, range[1]],
413
- }),
414
- range,
415
- });
416
- this.registerTSNodeInNodeMap(node, result);
417
- return result;
418
- }
419
- return this.convertJSXIdentifier(node);
420
- }
421
- /**
422
- * Converts a TypeScript JSX node.tagName into an ESTree node.name
423
- * @param node the tagName object from a JSX ts.Node
424
- * @param parent
425
- * @returns the converted ESTree name object
426
- */
427
- convertJSXTagName(node, parent) {
428
- let result;
429
- switch (node.kind) {
430
- case SyntaxKind.PropertyAccessExpression:
431
- if (node.name.kind === SyntaxKind.PrivateIdentifier) {
432
- // This is one of the few times where TS explicitly errors, and doesn't even gracefully handle the syntax.
433
- // So we shouldn't ever get into this state to begin with.
434
- throw new Error('Non-private identifier expected.');
435
- }
436
- result = this.createNode(node, {
437
- type: ts_estree_1.AST_NODE_TYPES.JSXMemberExpression,
438
- object: this.convertJSXTagName(node.expression, parent),
439
- property: this.convertJSXIdentifier(node.name),
440
- });
441
- break;
442
- case SyntaxKind.ThisKeyword:
443
- case SyntaxKind.Identifier:
444
- default:
445
- return this.convertJSXNamespaceOrIdentifier(node);
446
- }
447
- this.registerTSNodeInNodeMap(node, result);
448
- return result;
449
- }
450
- convertMethodSignature(node) {
451
- const result = this.createNode(node, {
452
- type: ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
453
- computed: (0, node_utils_1.isComputedProperty)(node.name),
454
- key: this.convertChild(node.name),
455
- params: this.convertParameters(node.parameters),
456
- kind: (() => {
457
- switch (node.kind) {
458
- case SyntaxKind.GetAccessor:
459
- return 'get';
460
- case SyntaxKind.SetAccessor:
461
- return 'set';
462
- case SyntaxKind.MethodSignature:
463
- return 'method';
464
- }
465
- })(),
466
- });
467
- if ((0, node_utils_1.isOptional)(node)) {
468
- result.optional = true;
469
- }
470
- if (node.type) {
471
- result.returnType = this.convertTypeAnnotation(node.type, node);
472
- }
473
- if ((0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node)) {
474
- result.readonly = true;
475
- }
476
- if (node.typeParameters) {
477
- result.typeParameters =
478
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
479
- }
480
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
481
- if (accessibility) {
482
- result.accessibility = accessibility;
483
- }
484
- if ((0, node_utils_1.hasModifier)(SyntaxKind.ExportKeyword, node)) {
485
- result.export = true;
486
- }
487
- if ((0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node)) {
488
- result.static = true;
489
- }
490
- return result;
491
- }
492
- convertAssertClasue(node) {
493
- return node === undefined
494
- ? []
495
- : node.elements.map(element => this.convertChild(element));
496
- }
497
- /**
498
- * Applies the given TS modifiers to the given result object.
499
- * @param result
500
- * @param modifiers original ts.Nodes from the node.modifiers array
501
- * @returns the current result object will be mutated
502
- * @deprecated This method adds not standardized `modifiers` property in nodes
503
- */
504
- applyModifiersToResult(result, modifiers) {
505
- if (!modifiers || !modifiers.length) {
506
- return;
507
- }
508
- const remainingModifiers = [];
509
- /**
510
- * Some modifiers are explicitly handled by applying them as
511
- * boolean values on the result node. As well as adding them
512
- * to the result, we remove them from the array, so that they
513
- * are not handled twice.
514
- */
515
- for (const modifier of modifiers) {
516
- switch (modifier.kind) {
517
- /**
518
- * Ignore ExportKeyword and DefaultKeyword, they are handled
519
- * via the fixExports utility function
520
- */
521
- case SyntaxKind.ExportKeyword:
522
- case SyntaxKind.DefaultKeyword:
523
- break;
524
- case SyntaxKind.ConstKeyword:
525
- result.const = true;
526
- break;
527
- case SyntaxKind.DeclareKeyword:
528
- result.declare = true;
529
- break;
530
- default:
531
- remainingModifiers.push(this.convertChild(modifier));
532
- break;
533
- }
534
- }
535
- /**
536
- * If there are still valid modifiers available which have
537
- * not been explicitly handled above, we just convert and
538
- * add the modifiers array to the result node.
539
- */
540
- if (remainingModifiers.length) {
541
- result.modifiers = remainingModifiers;
542
- }
543
- }
544
- /**
545
- * Uses the provided range location to adjust the location data of the given Node
546
- * @param result The node that will have its location data mutated
547
- * @param childRange The child node range used to expand location
548
- */
549
- fixParentLocation(result, childRange) {
550
- if (childRange[0] < result.range[0]) {
551
- result.range[0] = childRange[0];
552
- result.loc.start = (0, node_utils_1.getLineAndCharacterFor)(result.range[0], this.ast);
553
- }
554
- if (childRange[1] > result.range[1]) {
555
- result.range[1] = childRange[1];
556
- result.loc.end = (0, node_utils_1.getLineAndCharacterFor)(result.range[1], this.ast);
557
- }
558
- }
559
- assertModuleSpecifier(node, allowNull) {
560
- var _a;
561
- if (!allowNull && node.moduleSpecifier == null) {
562
- throw (0, node_utils_1.createError)(this.ast, node.pos, 'Module specifier must be a string literal.');
563
- }
564
- if (node.moduleSpecifier &&
565
- ((_a = node.moduleSpecifier) === null || _a === void 0 ? void 0 : _a.kind) !== SyntaxKind.StringLiteral) {
566
- throw (0, node_utils_1.createError)(this.ast, node.moduleSpecifier.pos, 'Module specifier must be a string literal.');
567
- }
568
- }
569
- /**
570
- * Converts a TypeScript node into an ESTree node.
571
- * The core of the conversion logic:
572
- * Identify and convert each relevant TypeScript SyntaxKind
573
- * @param node the child ts.Node
574
- * @param parent parentNode
575
- * @returns the converted ESTree node
576
- */
577
- convertNode(node, parent) {
578
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
579
- switch (node.kind) {
580
- case SyntaxKind.SourceFile: {
581
- return this.createNode(node, {
582
- type: ts_estree_1.AST_NODE_TYPES.Program,
583
- body: this.convertBodyExpressions(node.statements, node),
584
- sourceType: node.externalModuleIndicator ? 'module' : 'script',
585
- range: [node.getStart(this.ast), node.endOfFileToken.end],
586
- });
587
- }
588
- case SyntaxKind.Block: {
589
- return this.createNode(node, {
590
- type: ts_estree_1.AST_NODE_TYPES.BlockStatement,
591
- body: this.convertBodyExpressions(node.statements, node),
592
- });
593
- }
594
- case SyntaxKind.Identifier: {
595
- if ((0, node_utils_1.isThisInTypeQuery)(node)) {
596
- // special case for `typeof this.foo` - TS emits an Identifier for `this`
597
- // but we want to treat it as a ThisExpression for consistency
598
- return this.createNode(node, {
599
- type: ts_estree_1.AST_NODE_TYPES.ThisExpression,
600
- });
601
- }
602
- return this.createNode(node, {
603
- type: ts_estree_1.AST_NODE_TYPES.Identifier,
604
- name: node.text,
605
- });
606
- }
607
- case SyntaxKind.PrivateIdentifier: {
608
- return this.createNode(node, {
609
- type: ts_estree_1.AST_NODE_TYPES.PrivateIdentifier,
610
- // typescript includes the `#` in the text
611
- name: node.text.slice(1),
612
- });
613
- }
614
- case SyntaxKind.WithStatement:
615
- return this.createNode(node, {
616
- type: ts_estree_1.AST_NODE_TYPES.WithStatement,
617
- object: this.convertChild(node.expression),
618
- body: this.convertChild(node.statement),
619
- });
620
- // Control Flow
621
- case SyntaxKind.ReturnStatement:
622
- return this.createNode(node, {
623
- type: ts_estree_1.AST_NODE_TYPES.ReturnStatement,
624
- argument: this.convertChild(node.expression),
625
- });
626
- case SyntaxKind.LabeledStatement:
627
- return this.createNode(node, {
628
- type: ts_estree_1.AST_NODE_TYPES.LabeledStatement,
629
- label: this.convertChild(node.label),
630
- body: this.convertChild(node.statement),
631
- });
632
- case SyntaxKind.ContinueStatement:
633
- return this.createNode(node, {
634
- type: ts_estree_1.AST_NODE_TYPES.ContinueStatement,
635
- label: this.convertChild(node.label),
636
- });
637
- case SyntaxKind.BreakStatement:
638
- return this.createNode(node, {
639
- type: ts_estree_1.AST_NODE_TYPES.BreakStatement,
640
- label: this.convertChild(node.label),
641
- });
642
- // Choice
643
- case SyntaxKind.IfStatement:
644
- return this.createNode(node, {
645
- type: ts_estree_1.AST_NODE_TYPES.IfStatement,
646
- test: this.convertChild(node.expression),
647
- consequent: this.convertChild(node.thenStatement),
648
- alternate: this.convertChild(node.elseStatement),
649
- });
650
- case SyntaxKind.SwitchStatement:
651
- return this.createNode(node, {
652
- type: ts_estree_1.AST_NODE_TYPES.SwitchStatement,
653
- discriminant: this.convertChild(node.expression),
654
- cases: node.caseBlock.clauses.map(el => this.convertChild(el)),
655
- });
656
- case SyntaxKind.CaseClause:
657
- case SyntaxKind.DefaultClause:
658
- return this.createNode(node, {
659
- type: ts_estree_1.AST_NODE_TYPES.SwitchCase,
660
- // expression is present in case only
661
- test: node.kind === SyntaxKind.CaseClause
662
- ? this.convertChild(node.expression)
663
- : null,
664
- consequent: node.statements.map(el => this.convertChild(el)),
665
- });
666
- // Exceptions
667
- case SyntaxKind.ThrowStatement:
668
- return this.createNode(node, {
669
- type: ts_estree_1.AST_NODE_TYPES.ThrowStatement,
670
- argument: this.convertChild(node.expression),
671
- });
672
- case SyntaxKind.TryStatement:
673
- return this.createNode(node, {
674
- type: ts_estree_1.AST_NODE_TYPES.TryStatement,
675
- block: this.convertChild(node.tryBlock),
676
- handler: this.convertChild(node.catchClause),
677
- finalizer: this.convertChild(node.finallyBlock),
678
- });
679
- case SyntaxKind.CatchClause:
680
- return this.createNode(node, {
681
- type: ts_estree_1.AST_NODE_TYPES.CatchClause,
682
- param: node.variableDeclaration
683
- ? this.convertBindingNameWithTypeAnnotation(node.variableDeclaration.name, node.variableDeclaration.type)
684
- : null,
685
- body: this.convertChild(node.block),
686
- });
687
- // Loops
688
- case SyntaxKind.WhileStatement:
689
- return this.createNode(node, {
690
- type: ts_estree_1.AST_NODE_TYPES.WhileStatement,
691
- test: this.convertChild(node.expression),
692
- body: this.convertChild(node.statement),
693
- });
694
- /**
695
- * Unlike other parsers, TypeScript calls a "DoWhileStatement"
696
- * a "DoStatement"
697
- */
698
- case SyntaxKind.DoStatement:
699
- return this.createNode(node, {
700
- type: ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
701
- test: this.convertChild(node.expression),
702
- body: this.convertChild(node.statement),
703
- });
704
- case SyntaxKind.ForStatement:
705
- return this.createNode(node, {
706
- type: ts_estree_1.AST_NODE_TYPES.ForStatement,
707
- init: this.convertChild(node.initializer),
708
- test: this.convertChild(node.condition),
709
- update: this.convertChild(node.incrementor),
710
- body: this.convertChild(node.statement),
711
- });
712
- case SyntaxKind.ForInStatement:
713
- return this.createNode(node, {
714
- type: ts_estree_1.AST_NODE_TYPES.ForInStatement,
715
- left: this.convertPattern(node.initializer),
716
- right: this.convertChild(node.expression),
717
- body: this.convertChild(node.statement),
718
- });
719
- case SyntaxKind.ForOfStatement:
720
- return this.createNode(node, {
721
- type: ts_estree_1.AST_NODE_TYPES.ForOfStatement,
722
- left: this.convertPattern(node.initializer),
723
- right: this.convertChild(node.expression),
724
- body: this.convertChild(node.statement),
725
- await: Boolean(node.awaitModifier &&
726
- node.awaitModifier.kind === SyntaxKind.AwaitKeyword),
727
- });
728
- // Declarations
729
- case SyntaxKind.FunctionDeclaration: {
730
- const isDeclare = (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node);
731
- const result = this.createNode(node, {
732
- type: isDeclare || !node.body
733
- ? ts_estree_1.AST_NODE_TYPES.TSDeclareFunction
734
- : ts_estree_1.AST_NODE_TYPES.FunctionDeclaration,
735
- id: this.convertChild(node.name),
736
- generator: !!node.asteriskToken,
737
- expression: false,
738
- async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node),
739
- params: this.convertParameters(node.parameters),
740
- body: this.convertChild(node.body) || undefined,
741
- });
742
- // Process returnType
743
- if (node.type) {
744
- result.returnType = this.convertTypeAnnotation(node.type, node);
745
- }
746
- // Process typeParameters
747
- if (node.typeParameters) {
748
- result.typeParameters =
749
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
750
- }
751
- if (isDeclare) {
752
- result.declare = true;
753
- }
754
- // check for exports
755
- return this.fixExports(node, result);
756
- }
757
- case SyntaxKind.VariableDeclaration: {
758
- const result = this.createNode(node, {
759
- type: ts_estree_1.AST_NODE_TYPES.VariableDeclarator,
760
- id: this.convertBindingNameWithTypeAnnotation(node.name, node.type, node),
761
- init: this.convertChild(node.initializer),
762
- });
763
- if (node.exclamationToken) {
764
- result.definite = true;
765
- }
766
- return result;
767
- }
768
- case SyntaxKind.VariableStatement: {
769
- const result = this.createNode(node, {
770
- type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration,
771
- declarations: node.declarationList.declarations.map(el => this.convertChild(el)),
772
- kind: (0, node_utils_1.getDeclarationKind)(node.declarationList),
773
- });
774
- /**
775
- * Semantically, decorators are not allowed on variable declarations,
776
- * but the TypeScript compiler will parse them and produce a valid AST,
777
- * so we handle them here too.
778
- */
779
- if (node.decorators) {
780
- result.decorators = node.decorators.map(el => this.convertChild(el));
781
- }
782
- if ((0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node)) {
783
- result.declare = true;
784
- }
785
- // check for exports
786
- return this.fixExports(node, result);
787
- }
788
- // mostly for for-of, for-in
789
- case SyntaxKind.VariableDeclarationList:
790
- return this.createNode(node, {
791
- type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration,
792
- declarations: node.declarations.map(el => this.convertChild(el)),
793
- kind: (0, node_utils_1.getDeclarationKind)(node),
794
- });
795
- // Expressions
796
- case SyntaxKind.ExpressionStatement:
797
- return this.createNode(node, {
798
- type: ts_estree_1.AST_NODE_TYPES.ExpressionStatement,
799
- expression: this.convertChild(node.expression),
800
- });
801
- case SyntaxKind.ThisKeyword:
802
- return this.createNode(node, {
803
- type: ts_estree_1.AST_NODE_TYPES.ThisExpression,
804
- });
805
- case SyntaxKind.ArrayLiteralExpression: {
806
- // TypeScript uses ArrayLiteralExpression in destructuring assignment, too
807
- if (this.allowPattern) {
808
- return this.createNode(node, {
809
- type: ts_estree_1.AST_NODE_TYPES.ArrayPattern,
810
- elements: node.elements.map(el => this.convertPattern(el)),
811
- });
812
- }
813
- else {
814
- return this.createNode(node, {
815
- type: ts_estree_1.AST_NODE_TYPES.ArrayExpression,
816
- elements: node.elements.map(el => this.convertChild(el)),
817
- });
818
- }
819
- }
820
- case SyntaxKind.ObjectLiteralExpression: {
821
- // TypeScript uses ObjectLiteralExpression in destructuring assignment, too
822
- if (this.allowPattern) {
823
- return this.createNode(node, {
824
- type: ts_estree_1.AST_NODE_TYPES.ObjectPattern,
825
- properties: node.properties.map(el => this.convertPattern(el)),
826
- });
827
- }
828
- else {
829
- return this.createNode(node, {
830
- type: ts_estree_1.AST_NODE_TYPES.ObjectExpression,
831
- properties: node.properties.map(el => this.convertChild(el)),
832
- });
833
- }
834
- }
835
- case SyntaxKind.PropertyAssignment:
836
- return this.createNode(node, {
837
- type: ts_estree_1.AST_NODE_TYPES.Property,
838
- key: this.convertChild(node.name),
839
- value: this.converter(node.initializer, node, this.inTypeMode, this.allowPattern),
840
- computed: (0, node_utils_1.isComputedProperty)(node.name),
841
- method: false,
842
- shorthand: false,
843
- kind: 'init',
844
- });
845
- case SyntaxKind.ShorthandPropertyAssignment: {
846
- if (node.objectAssignmentInitializer) {
847
- return this.createNode(node, {
848
- type: ts_estree_1.AST_NODE_TYPES.Property,
849
- key: this.convertChild(node.name),
850
- value: this.createNode(node, {
851
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
852
- left: this.convertPattern(node.name),
853
- right: this.convertChild(node.objectAssignmentInitializer),
854
- }),
855
- computed: false,
856
- method: false,
857
- shorthand: true,
858
- kind: 'init',
859
- });
860
- }
861
- else {
862
- return this.createNode(node, {
863
- type: ts_estree_1.AST_NODE_TYPES.Property,
864
- key: this.convertChild(node.name),
865
- value: this.convertChild(node.name),
866
- computed: false,
867
- method: false,
868
- shorthand: true,
869
- kind: 'init',
870
- });
871
- }
872
- }
873
- case SyntaxKind.ComputedPropertyName:
874
- return this.convertChild(node.expression);
875
- case SyntaxKind.PropertyDeclaration: {
876
- const isAbstract = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node);
877
- const result = this.createNode(node, {
878
- type: isAbstract
879
- ? ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition
880
- : ts_estree_1.AST_NODE_TYPES.PropertyDefinition,
881
- key: this.convertChild(node.name),
882
- value: isAbstract ? null : this.convertChild(node.initializer),
883
- computed: (0, node_utils_1.isComputedProperty)(node.name),
884
- static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node),
885
- readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node) || undefined,
886
- declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node),
887
- override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node),
888
- });
889
- if (node.type) {
890
- result.typeAnnotation = this.convertTypeAnnotation(node.type, node);
891
- }
892
- if (node.decorators) {
893
- result.decorators = node.decorators.map(el => this.convertChild(el));
894
- }
895
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
896
- if (accessibility) {
897
- result.accessibility = accessibility;
898
- }
899
- if ((node.name.kind === SyntaxKind.Identifier ||
900
- node.name.kind === SyntaxKind.ComputedPropertyName ||
901
- node.name.kind === SyntaxKind.PrivateIdentifier) &&
902
- node.questionToken) {
903
- result.optional = true;
904
- }
905
- if (node.exclamationToken) {
906
- result.definite = true;
907
- }
908
- if (result.key.type === ts_estree_1.AST_NODE_TYPES.Literal && node.questionToken) {
909
- result.optional = true;
910
- }
911
- return result;
912
- }
913
- case SyntaxKind.GetAccessor:
914
- case SyntaxKind.SetAccessor: {
915
- if (node.parent.kind === SyntaxKind.InterfaceDeclaration ||
916
- node.parent.kind === SyntaxKind.TypeLiteral) {
917
- return this.convertMethodSignature(node);
918
- }
919
- }
920
- // otherwise, it is a non-type accessor - intentional fallthrough
921
- case SyntaxKind.MethodDeclaration: {
922
- const method = this.createNode(node, {
923
- type: !node.body
924
- ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression
925
- : ts_estree_1.AST_NODE_TYPES.FunctionExpression,
926
- id: null,
927
- generator: !!node.asteriskToken,
928
- expression: false,
929
- async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node),
930
- body: this.convertChild(node.body),
931
- range: [node.parameters.pos - 1, node.end],
932
- params: [],
933
- });
934
- if (node.type) {
935
- method.returnType = this.convertTypeAnnotation(node.type, node);
936
- }
937
- // Process typeParameters
938
- if (node.typeParameters) {
939
- method.typeParameters =
940
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
941
- this.fixParentLocation(method, method.typeParameters.range);
942
- }
943
- let result;
944
- if (parent.kind === SyntaxKind.ObjectLiteralExpression) {
945
- method.params = node.parameters.map(el => this.convertChild(el));
946
- result = this.createNode(node, {
947
- type: ts_estree_1.AST_NODE_TYPES.Property,
948
- key: this.convertChild(node.name),
949
- value: method,
950
- computed: (0, node_utils_1.isComputedProperty)(node.name),
951
- method: node.kind === SyntaxKind.MethodDeclaration,
952
- shorthand: false,
953
- kind: 'init',
954
- });
955
- }
956
- else {
957
- // class
958
- /**
959
- * Unlike in object literal methods, class method params can have decorators
960
- */
961
- method.params = this.convertParameters(node.parameters);
962
- /**
963
- * TypeScript class methods can be defined as "abstract"
964
- */
965
- const methodDefinitionType = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node)
966
- ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition
967
- : ts_estree_1.AST_NODE_TYPES.MethodDefinition;
968
- result = this.createNode(node, {
969
- type: methodDefinitionType,
970
- key: this.convertChild(node.name),
971
- value: method,
972
- computed: (0, node_utils_1.isComputedProperty)(node.name),
973
- static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node),
974
- kind: 'method',
975
- override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node),
976
- });
977
- if (node.decorators) {
978
- result.decorators = node.decorators.map(el => this.convertChild(el));
979
- }
980
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
981
- if (accessibility) {
982
- result.accessibility = accessibility;
983
- }
984
- }
985
- if (node.questionToken) {
986
- result.optional = true;
987
- }
988
- if (node.kind === SyntaxKind.GetAccessor) {
989
- result.kind = 'get';
990
- }
991
- else if (node.kind === SyntaxKind.SetAccessor) {
992
- result.kind = 'set';
993
- }
994
- else if (!result.static &&
995
- node.name.kind === SyntaxKind.StringLiteral &&
996
- node.name.text === 'constructor' &&
997
- result.type !== ts_estree_1.AST_NODE_TYPES.Property) {
998
- result.kind = 'constructor';
999
- }
1000
- return result;
1001
- }
1002
- // TypeScript uses this even for static methods named "constructor"
1003
- case SyntaxKind.Constructor: {
1004
- const lastModifier = (0, node_utils_1.getLastModifier)(node);
1005
- const constructorToken = (lastModifier && (0, node_utils_1.findNextToken)(lastModifier, node, this.ast)) ||
1006
- node.getFirstToken();
1007
- const constructor = this.createNode(node, {
1008
- type: !node.body
1009
- ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression
1010
- : ts_estree_1.AST_NODE_TYPES.FunctionExpression,
1011
- id: null,
1012
- params: this.convertParameters(node.parameters),
1013
- generator: false,
1014
- expression: false,
1015
- async: false,
1016
- body: this.convertChild(node.body),
1017
- range: [node.parameters.pos - 1, node.end],
1018
- });
1019
- // Process typeParameters
1020
- if (node.typeParameters) {
1021
- constructor.typeParameters =
1022
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1023
- this.fixParentLocation(constructor, constructor.typeParameters.range);
1024
- }
1025
- // Process returnType
1026
- if (node.type) {
1027
- constructor.returnType = this.convertTypeAnnotation(node.type, node);
1028
- }
1029
- const constructorKey = this.createNode(node, {
1030
- type: ts_estree_1.AST_NODE_TYPES.Identifier,
1031
- name: 'constructor',
1032
- range: [constructorToken.getStart(this.ast), constructorToken.end],
1033
- });
1034
- const isStatic = (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node);
1035
- const result = this.createNode(node, {
1036
- type: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node)
1037
- ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition
1038
- : ts_estree_1.AST_NODE_TYPES.MethodDefinition,
1039
- key: constructorKey,
1040
- value: constructor,
1041
- computed: false,
1042
- static: isStatic,
1043
- kind: isStatic ? 'method' : 'constructor',
1044
- override: false,
1045
- });
1046
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
1047
- if (accessibility) {
1048
- result.accessibility = accessibility;
1049
- }
1050
- return result;
1051
- }
1052
- case SyntaxKind.FunctionExpression: {
1053
- const result = this.createNode(node, {
1054
- type: ts_estree_1.AST_NODE_TYPES.FunctionExpression,
1055
- id: this.convertChild(node.name),
1056
- generator: !!node.asteriskToken,
1057
- params: this.convertParameters(node.parameters),
1058
- body: this.convertChild(node.body),
1059
- async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node),
1060
- expression: false,
1061
- });
1062
- // Process returnType
1063
- if (node.type) {
1064
- result.returnType = this.convertTypeAnnotation(node.type, node);
1065
- }
1066
- // Process typeParameters
1067
- if (node.typeParameters) {
1068
- result.typeParameters =
1069
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1070
- }
1071
- return result;
1072
- }
1073
- case SyntaxKind.SuperKeyword:
1074
- return this.createNode(node, {
1075
- type: ts_estree_1.AST_NODE_TYPES.Super,
1076
- });
1077
- case SyntaxKind.ArrayBindingPattern:
1078
- return this.createNode(node, {
1079
- type: ts_estree_1.AST_NODE_TYPES.ArrayPattern,
1080
- elements: node.elements.map(el => this.convertPattern(el)),
1081
- });
1082
- // occurs with missing array elements like [,]
1083
- case SyntaxKind.OmittedExpression:
1084
- return null;
1085
- case SyntaxKind.ObjectBindingPattern:
1086
- return this.createNode(node, {
1087
- type: ts_estree_1.AST_NODE_TYPES.ObjectPattern,
1088
- properties: node.elements.map(el => this.convertPattern(el)),
1089
- });
1090
- case SyntaxKind.BindingElement: {
1091
- if (parent.kind === SyntaxKind.ArrayBindingPattern) {
1092
- const arrayItem = this.convertChild(node.name, parent);
1093
- if (node.initializer) {
1094
- return this.createNode(node, {
1095
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1096
- left: arrayItem,
1097
- right: this.convertChild(node.initializer),
1098
- });
1099
- }
1100
- else if (node.dotDotDotToken) {
1101
- return this.createNode(node, {
1102
- type: ts_estree_1.AST_NODE_TYPES.RestElement,
1103
- argument: arrayItem,
1104
- });
1105
- }
1106
- else {
1107
- return arrayItem;
1108
- }
1109
- }
1110
- else {
1111
- let result;
1112
- if (node.dotDotDotToken) {
1113
- result = this.createNode(node, {
1114
- type: ts_estree_1.AST_NODE_TYPES.RestElement,
1115
- argument: this.convertChild((_a = node.propertyName) !== null && _a !== void 0 ? _a : node.name),
1116
- });
1117
- }
1118
- else {
1119
- result = this.createNode(node, {
1120
- type: ts_estree_1.AST_NODE_TYPES.Property,
1121
- key: this.convertChild((_b = node.propertyName) !== null && _b !== void 0 ? _b : node.name),
1122
- value: this.convertChild(node.name),
1123
- computed: Boolean(node.propertyName &&
1124
- node.propertyName.kind === SyntaxKind.ComputedPropertyName),
1125
- method: false,
1126
- shorthand: !node.propertyName,
1127
- kind: 'init',
1128
- });
1129
- }
1130
- if (node.initializer) {
1131
- result.value = this.createNode(node, {
1132
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1133
- left: this.convertChild(node.name),
1134
- right: this.convertChild(node.initializer),
1135
- range: [node.name.getStart(this.ast), node.initializer.end],
1136
- });
1137
- }
1138
- return result;
1139
- }
1140
- }
1141
- case SyntaxKind.ArrowFunction: {
1142
- const result = this.createNode(node, {
1143
- type: ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
1144
- generator: false,
1145
- id: null,
1146
- params: this.convertParameters(node.parameters),
1147
- body: this.convertChild(node.body),
1148
- async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node),
1149
- expression: node.body.kind !== SyntaxKind.Block,
1150
- });
1151
- // Process returnType
1152
- if (node.type) {
1153
- result.returnType = this.convertTypeAnnotation(node.type, node);
1154
- }
1155
- // Process typeParameters
1156
- if (node.typeParameters) {
1157
- result.typeParameters =
1158
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1159
- }
1160
- return result;
1161
- }
1162
- case SyntaxKind.YieldExpression:
1163
- return this.createNode(node, {
1164
- type: ts_estree_1.AST_NODE_TYPES.YieldExpression,
1165
- delegate: !!node.asteriskToken,
1166
- argument: this.convertChild(node.expression),
1167
- });
1168
- case SyntaxKind.AwaitExpression:
1169
- return this.createNode(node, {
1170
- type: ts_estree_1.AST_NODE_TYPES.AwaitExpression,
1171
- argument: this.convertChild(node.expression),
1172
- });
1173
- // Template Literals
1174
- case SyntaxKind.NoSubstitutionTemplateLiteral:
1175
- return this.createNode(node, {
1176
- type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral,
1177
- quasis: [
1178
- this.createNode(node, {
1179
- type: ts_estree_1.AST_NODE_TYPES.TemplateElement,
1180
- value: {
1181
- raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - 1),
1182
- cooked: node.text,
1183
- },
1184
- tail: true,
1185
- }),
1186
- ],
1187
- expressions: [],
1188
- });
1189
- case SyntaxKind.TemplateExpression: {
1190
- const result = this.createNode(node, {
1191
- type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral,
1192
- quasis: [this.convertChild(node.head)],
1193
- expressions: [],
1194
- });
1195
- node.templateSpans.forEach(templateSpan => {
1196
- result.expressions.push(this.convertChild(templateSpan.expression));
1197
- result.quasis.push(this.convertChild(templateSpan.literal));
1198
- });
1199
- return result;
1200
- }
1201
- case SyntaxKind.TaggedTemplateExpression:
1202
- return this.createNode(node, {
1203
- type: ts_estree_1.AST_NODE_TYPES.TaggedTemplateExpression,
1204
- typeParameters: node.typeArguments
1205
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
1206
- : undefined,
1207
- tag: this.convertChild(node.tag),
1208
- quasi: this.convertChild(node.template),
1209
- });
1210
- case SyntaxKind.TemplateHead:
1211
- case SyntaxKind.TemplateMiddle:
1212
- case SyntaxKind.TemplateTail: {
1213
- const tail = node.kind === SyntaxKind.TemplateTail;
1214
- return this.createNode(node, {
1215
- type: ts_estree_1.AST_NODE_TYPES.TemplateElement,
1216
- value: {
1217
- raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - (tail ? 1 : 2)),
1218
- cooked: node.text,
1219
- },
1220
- tail,
1221
- });
1222
- }
1223
- // Patterns
1224
- case SyntaxKind.SpreadAssignment:
1225
- case SyntaxKind.SpreadElement: {
1226
- if (this.allowPattern) {
1227
- return this.createNode(node, {
1228
- type: ts_estree_1.AST_NODE_TYPES.RestElement,
1229
- argument: this.convertPattern(node.expression),
1230
- });
1231
- }
1232
- else {
1233
- return this.createNode(node, {
1234
- type: ts_estree_1.AST_NODE_TYPES.SpreadElement,
1235
- argument: this.convertChild(node.expression),
1236
- });
1237
- }
1238
- }
1239
- case SyntaxKind.Parameter: {
1240
- let parameter;
1241
- let result;
1242
- if (node.dotDotDotToken) {
1243
- parameter = result = this.createNode(node, {
1244
- type: ts_estree_1.AST_NODE_TYPES.RestElement,
1245
- argument: this.convertChild(node.name),
1246
- });
1247
- }
1248
- else if (node.initializer) {
1249
- parameter = this.convertChild(node.name);
1250
- result = this.createNode(node, {
1251
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1252
- left: parameter,
1253
- right: this.convertChild(node.initializer),
1254
- });
1255
- if (node.modifiers) {
1256
- // AssignmentPattern should not contain modifiers in range
1257
- result.range[0] = parameter.range[0];
1258
- result.loc = (0, node_utils_1.getLocFor)(result.range[0], result.range[1], this.ast);
1259
- }
1260
- }
1261
- else {
1262
- parameter = result = this.convertChild(node.name, parent);
1263
- }
1264
- if (node.type) {
1265
- parameter.typeAnnotation = this.convertTypeAnnotation(node.type, node);
1266
- this.fixParentLocation(parameter, parameter.typeAnnotation.range);
1267
- }
1268
- if (node.questionToken) {
1269
- if (node.questionToken.end > parameter.range[1]) {
1270
- parameter.range[1] = node.questionToken.end;
1271
- parameter.loc.end = (0, node_utils_1.getLineAndCharacterFor)(parameter.range[1], this.ast);
1272
- }
1273
- parameter.optional = true;
1274
- }
1275
- if (node.modifiers) {
1276
- return this.createNode(node, {
1277
- type: ts_estree_1.AST_NODE_TYPES.TSParameterProperty,
1278
- accessibility: (_c = (0, node_utils_1.getTSNodeAccessibility)(node)) !== null && _c !== void 0 ? _c : undefined,
1279
- readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node) || undefined,
1280
- static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node) || undefined,
1281
- export: (0, node_utils_1.hasModifier)(SyntaxKind.ExportKeyword, node) || undefined,
1282
- override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node) || undefined,
1283
- parameter: result,
1284
- });
1285
- }
1286
- return result;
1287
- }
1288
- // Classes
1289
- case SyntaxKind.ClassDeclaration:
1290
- case SyntaxKind.ClassExpression: {
1291
- const heritageClauses = (_d = node.heritageClauses) !== null && _d !== void 0 ? _d : [];
1292
- const classNodeType = node.kind === SyntaxKind.ClassDeclaration
1293
- ? ts_estree_1.AST_NODE_TYPES.ClassDeclaration
1294
- : ts_estree_1.AST_NODE_TYPES.ClassExpression;
1295
- const superClass = heritageClauses.find(clause => clause.token === SyntaxKind.ExtendsKeyword);
1296
- const implementsClause = heritageClauses.find(clause => clause.token === SyntaxKind.ImplementsKeyword);
1297
- const result = this.createNode(node, {
1298
- type: classNodeType,
1299
- id: this.convertChild(node.name),
1300
- body: this.createNode(node, {
1301
- type: ts_estree_1.AST_NODE_TYPES.ClassBody,
1302
- body: [],
1303
- range: [node.members.pos - 1, node.end],
1304
- }),
1305
- superClass: (superClass === null || superClass === void 0 ? void 0 : superClass.types[0])
1306
- ? this.convertChild(superClass.types[0].expression)
1307
- : null,
1308
- });
1309
- if (superClass) {
1310
- if (superClass.types.length > 1) {
1311
- throw (0, node_utils_1.createError)(this.ast, superClass.types[1].pos, 'Classes can only extend a single class.');
1312
- }
1313
- if ((_e = superClass.types[0]) === null || _e === void 0 ? void 0 : _e.typeArguments) {
1314
- result.superTypeParameters =
1315
- this.convertTypeArgumentsToTypeParameters(superClass.types[0].typeArguments, superClass.types[0]);
1316
- }
1317
- }
1318
- if (node.typeParameters) {
1319
- result.typeParameters =
1320
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1321
- }
1322
- if (implementsClause) {
1323
- result.implements = implementsClause.types.map(el => this.convertChild(el));
1324
- }
1325
- /**
1326
- * TypeScript class declarations can be defined as "abstract"
1327
- */
1328
- if ((0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node)) {
1329
- result.abstract = true;
1330
- }
1331
- if ((0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node)) {
1332
- result.declare = true;
1333
- }
1334
- if (node.decorators) {
1335
- result.decorators = node.decorators.map(el => this.convertChild(el));
1336
- }
1337
- const filteredMembers = node.members.filter(node_utils_1.isESTreeClassMember);
1338
- if (filteredMembers.length) {
1339
- result.body.body = filteredMembers.map(el => this.convertChild(el));
1340
- }
1341
- // check for exports
1342
- return this.fixExports(node, result);
1343
- }
1344
- // Modules
1345
- case SyntaxKind.ModuleBlock:
1346
- return this.createNode(node, {
1347
- type: ts_estree_1.AST_NODE_TYPES.TSModuleBlock,
1348
- body: this.convertBodyExpressions(node.statements, node),
1349
- });
1350
- case SyntaxKind.ImportDeclaration: {
1351
- this.assertModuleSpecifier(node, false);
1352
- const result = this.createNode(node, {
1353
- type: ts_estree_1.AST_NODE_TYPES.ImportDeclaration,
1354
- source: this.convertChild(node.moduleSpecifier),
1355
- specifiers: [],
1356
- importKind: 'value',
1357
- assertions: this.convertAssertClasue(node.assertClause),
1358
- });
1359
- if (node.importClause) {
1360
- if (node.importClause.isTypeOnly) {
1361
- result.importKind = 'type';
1362
- }
1363
- if (node.importClause.name) {
1364
- result.specifiers.push(this.convertChild(node.importClause));
1365
- }
1366
- if (node.importClause.namedBindings) {
1367
- switch (node.importClause.namedBindings.kind) {
1368
- case SyntaxKind.NamespaceImport:
1369
- result.specifiers.push(this.convertChild(node.importClause.namedBindings));
1370
- break;
1371
- case SyntaxKind.NamedImports:
1372
- result.specifiers = result.specifiers.concat(node.importClause.namedBindings.elements.map(el => this.convertChild(el)));
1373
- break;
1374
- }
1375
- }
1376
- }
1377
- return result;
1378
- }
1379
- case SyntaxKind.NamespaceImport:
1380
- return this.createNode(node, {
1381
- type: ts_estree_1.AST_NODE_TYPES.ImportNamespaceSpecifier,
1382
- local: this.convertChild(node.name),
1383
- });
1384
- case SyntaxKind.ImportSpecifier:
1385
- return this.createNode(node, {
1386
- type: ts_estree_1.AST_NODE_TYPES.ImportSpecifier,
1387
- local: this.convertChild(node.name),
1388
- imported: this.convertChild((_f = node.propertyName) !== null && _f !== void 0 ? _f : node.name),
1389
- importKind: node.isTypeOnly ? 'type' : 'value',
1390
- });
1391
- case SyntaxKind.ImportClause: {
1392
- const local = this.convertChild(node.name);
1393
- return this.createNode(node, {
1394
- type: ts_estree_1.AST_NODE_TYPES.ImportDefaultSpecifier,
1395
- local,
1396
- range: local.range,
1397
- });
1398
- }
1399
- case SyntaxKind.ExportDeclaration: {
1400
- if (((_g = node.exportClause) === null || _g === void 0 ? void 0 : _g.kind) === SyntaxKind.NamedExports) {
1401
- this.assertModuleSpecifier(node, true);
1402
- return this.createNode(node, {
1403
- type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
1404
- source: this.convertChild(node.moduleSpecifier),
1405
- specifiers: node.exportClause.elements.map(el => this.convertChild(el)),
1406
- exportKind: node.isTypeOnly ? 'type' : 'value',
1407
- declaration: null,
1408
- assertions: this.convertAssertClasue(node.assertClause),
1409
- });
1410
- }
1411
- else {
1412
- this.assertModuleSpecifier(node, false);
1413
- return this.createNode(node, {
1414
- type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration,
1415
- source: this.convertChild(node.moduleSpecifier),
1416
- exportKind: node.isTypeOnly ? 'type' : 'value',
1417
- exported:
1418
- // note - for compat with 3.7.x, where node.exportClause is always undefined and
1419
- // SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this
1420
- // cannot be shortened to an optional chain, or else you end up with
1421
- // undefined === undefined, and the true path will hard error at runtime
1422
- node.exportClause &&
1423
- node.exportClause.kind === SyntaxKind.NamespaceExport
1424
- ? this.convertChild(node.exportClause.name)
1425
- : null,
1426
- assertions: this.convertAssertClasue(node.assertClause),
1427
- });
1428
- }
1429
- }
1430
- case SyntaxKind.ExportSpecifier:
1431
- return this.createNode(node, {
1432
- type: ts_estree_1.AST_NODE_TYPES.ExportSpecifier,
1433
- local: this.convertChild((_h = node.propertyName) !== null && _h !== void 0 ? _h : node.name),
1434
- exported: this.convertChild(node.name),
1435
- exportKind: node.isTypeOnly ? 'type' : 'value',
1436
- });
1437
- case SyntaxKind.ExportAssignment:
1438
- if (node.isExportEquals) {
1439
- return this.createNode(node, {
1440
- type: ts_estree_1.AST_NODE_TYPES.TSExportAssignment,
1441
- expression: this.convertChild(node.expression),
1442
- });
1443
- }
1444
- else {
1445
- return this.createNode(node, {
1446
- type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
1447
- declaration: this.convertChild(node.expression),
1448
- exportKind: 'value',
1449
- });
1450
- }
1451
- // Unary Operations
1452
- case SyntaxKind.PrefixUnaryExpression:
1453
- case SyntaxKind.PostfixUnaryExpression: {
1454
- const operator = (0, node_utils_1.getTextForTokenKind)(node.operator);
1455
- /**
1456
- * ESTree uses UpdateExpression for ++/--
1457
- */
1458
- if (operator === '++' || operator === '--') {
1459
- return this.createNode(node, {
1460
- type: ts_estree_1.AST_NODE_TYPES.UpdateExpression,
1461
- operator,
1462
- prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1463
- argument: this.convertChild(node.operand),
1464
- });
1465
- }
1466
- else {
1467
- return this.createNode(node, {
1468
- type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1469
- operator,
1470
- prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1471
- argument: this.convertChild(node.operand),
1472
- });
1473
- }
1474
- }
1475
- case SyntaxKind.DeleteExpression:
1476
- return this.createNode(node, {
1477
- type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1478
- operator: 'delete',
1479
- prefix: true,
1480
- argument: this.convertChild(node.expression),
1481
- });
1482
- case SyntaxKind.VoidExpression:
1483
- return this.createNode(node, {
1484
- type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1485
- operator: 'void',
1486
- prefix: true,
1487
- argument: this.convertChild(node.expression),
1488
- });
1489
- case SyntaxKind.TypeOfExpression:
1490
- return this.createNode(node, {
1491
- type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1492
- operator: 'typeof',
1493
- prefix: true,
1494
- argument: this.convertChild(node.expression),
1495
- });
1496
- case SyntaxKind.TypeOperator:
1497
- return this.createNode(node, {
1498
- type: ts_estree_1.AST_NODE_TYPES.TSTypeOperator,
1499
- operator: (0, node_utils_1.getTextForTokenKind)(node.operator),
1500
- typeAnnotation: this.convertChild(node.type),
1501
- });
1502
- // Binary Operations
1503
- case SyntaxKind.BinaryExpression: {
1504
- // TypeScript uses BinaryExpression for sequences as well
1505
- if ((0, node_utils_1.isComma)(node.operatorToken)) {
1506
- const result = this.createNode(node, {
1507
- type: ts_estree_1.AST_NODE_TYPES.SequenceExpression,
1508
- expressions: [],
1509
- });
1510
- const left = this.convertChild(node.left);
1511
- if (left.type === ts_estree_1.AST_NODE_TYPES.SequenceExpression &&
1512
- node.left.kind !== SyntaxKind.ParenthesizedExpression) {
1513
- result.expressions = result.expressions.concat(left.expressions);
1514
- }
1515
- else {
1516
- result.expressions.push(left);
1517
- }
1518
- result.expressions.push(this.convertChild(node.right));
1519
- return result;
1520
- }
1521
- else {
1522
- const type = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken);
1523
- if (this.allowPattern &&
1524
- type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) {
1525
- return this.createNode(node, {
1526
- type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
1527
- left: this.convertPattern(node.left, node),
1528
- right: this.convertChild(node.right),
1529
- });
1530
- }
1531
- return this.createNode(node, {
1532
- type,
1533
- operator: (0, node_utils_1.getTextForTokenKind)(node.operatorToken.kind),
1534
- left: this.converter(node.left, node, this.inTypeMode, type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression),
1535
- right: this.convertChild(node.right),
1536
- });
1537
- }
1538
- }
1539
- case SyntaxKind.PropertyAccessExpression: {
1540
- const object = this.convertChild(node.expression);
1541
- const property = this.convertChild(node.name);
1542
- const computed = false;
1543
- const result = this.createNode(node, {
1544
- type: ts_estree_1.AST_NODE_TYPES.MemberExpression,
1545
- object,
1546
- property,
1547
- computed,
1548
- optional: node.questionDotToken !== undefined,
1549
- });
1550
- return this.convertChainExpression(result, node);
1551
- }
1552
- case SyntaxKind.ElementAccessExpression: {
1553
- const object = this.convertChild(node.expression);
1554
- const property = this.convertChild(node.argumentExpression);
1555
- const computed = true;
1556
- const result = this.createNode(node, {
1557
- type: ts_estree_1.AST_NODE_TYPES.MemberExpression,
1558
- object,
1559
- property,
1560
- computed,
1561
- optional: node.questionDotToken !== undefined,
1562
- });
1563
- return this.convertChainExpression(result, node);
1564
- }
1565
- case SyntaxKind.CallExpression: {
1566
- if (node.expression.kind === SyntaxKind.ImportKeyword) {
1567
- if (node.arguments.length !== 1 && node.arguments.length !== 2) {
1568
- throw (0, node_utils_1.createError)(this.ast, node.arguments.pos, 'Dynamic import requires exactly one or two arguments.');
1569
- }
1570
- return this.createNode(node, {
1571
- type: ts_estree_1.AST_NODE_TYPES.ImportExpression,
1572
- source: this.convertChild(node.arguments[0]),
1573
- attributes: node.arguments[1]
1574
- ? this.convertChild(node.arguments[1])
1575
- : null,
1576
- });
1577
- }
1578
- const callee = this.convertChild(node.expression);
1579
- const args = node.arguments.map(el => this.convertChild(el));
1580
- const result = this.createNode(node, {
1581
- type: ts_estree_1.AST_NODE_TYPES.CallExpression,
1582
- callee,
1583
- arguments: args,
1584
- optional: node.questionDotToken !== undefined,
1585
- });
1586
- if (node.typeArguments) {
1587
- result.typeParameters = this.convertTypeArgumentsToTypeParameters(node.typeArguments, node);
1588
- }
1589
- return this.convertChainExpression(result, node);
1590
- }
1591
- case SyntaxKind.NewExpression: {
1592
- // NOTE - NewExpression cannot have an optional chain in it
1593
- const result = this.createNode(node, {
1594
- type: ts_estree_1.AST_NODE_TYPES.NewExpression,
1595
- callee: this.convertChild(node.expression),
1596
- arguments: node.arguments
1597
- ? node.arguments.map(el => this.convertChild(el))
1598
- : [],
1599
- });
1600
- if (node.typeArguments) {
1601
- result.typeParameters = this.convertTypeArgumentsToTypeParameters(node.typeArguments, node);
1602
- }
1603
- return result;
1604
- }
1605
- case SyntaxKind.ConditionalExpression:
1606
- return this.createNode(node, {
1607
- type: ts_estree_1.AST_NODE_TYPES.ConditionalExpression,
1608
- test: this.convertChild(node.condition),
1609
- consequent: this.convertChild(node.whenTrue),
1610
- alternate: this.convertChild(node.whenFalse),
1611
- });
1612
- case SyntaxKind.MetaProperty: {
1613
- return this.createNode(node, {
1614
- type: ts_estree_1.AST_NODE_TYPES.MetaProperty,
1615
- meta: this.createNode(
1616
- // TODO: do we really want to convert it to Token?
1617
- node.getFirstToken(), {
1618
- type: ts_estree_1.AST_NODE_TYPES.Identifier,
1619
- name: (0, node_utils_1.getTextForTokenKind)(node.keywordToken),
1620
- }),
1621
- property: this.convertChild(node.name),
1622
- });
1623
- }
1624
- case SyntaxKind.Decorator: {
1625
- return this.createNode(node, {
1626
- type: ts_estree_1.AST_NODE_TYPES.Decorator,
1627
- expression: this.convertChild(node.expression),
1628
- });
1629
- }
1630
- // Literals
1631
- case SyntaxKind.StringLiteral: {
1632
- return this.createNode(node, {
1633
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1634
- value: parent.kind === SyntaxKind.JsxAttribute
1635
- ? (0, node_utils_1.unescapeStringLiteralText)(node.text)
1636
- : node.text,
1637
- raw: node.getText(),
1638
- });
1639
- }
1640
- case SyntaxKind.NumericLiteral: {
1641
- return this.createNode(node, {
1642
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1643
- value: Number(node.text),
1644
- raw: node.getText(),
1645
- });
1646
- }
1647
- case SyntaxKind.BigIntLiteral: {
1648
- const range = (0, node_utils_1.getRange)(node, this.ast);
1649
- const rawValue = this.ast.text.slice(range[0], range[1]);
1650
- const bigint = rawValue
1651
- // remove suffix `n`
1652
- .slice(0, -1)
1653
- // `BigInt` doesn't accept numeric separator
1654
- // and `bigint` property should not include numeric separator
1655
- .replace(/_/g, '');
1656
- const value = typeof BigInt !== 'undefined' ? BigInt(bigint) : null;
1657
- return this.createNode(node, {
1658
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1659
- raw: rawValue,
1660
- value: value,
1661
- bigint: value === null ? bigint : String(value),
1662
- range,
1663
- });
1664
- }
1665
- case SyntaxKind.RegularExpressionLiteral: {
1666
- const pattern = node.text.slice(1, node.text.lastIndexOf('/'));
1667
- const flags = node.text.slice(node.text.lastIndexOf('/') + 1);
1668
- let regex = null;
1669
- try {
1670
- regex = new RegExp(pattern, flags);
1671
- }
1672
- catch (exception) {
1673
- regex = null;
1674
- }
1675
- return this.createNode(node, {
1676
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1677
- value: regex,
1678
- raw: node.text,
1679
- regex: {
1680
- pattern,
1681
- flags,
1682
- },
1683
- });
1684
- }
1685
- case SyntaxKind.TrueKeyword:
1686
- return this.createNode(node, {
1687
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1688
- value: true,
1689
- raw: 'true',
1690
- });
1691
- case SyntaxKind.FalseKeyword:
1692
- return this.createNode(node, {
1693
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1694
- value: false,
1695
- raw: 'false',
1696
- });
1697
- case SyntaxKind.NullKeyword: {
1698
- if (!version_check_1.typescriptVersionIsAtLeast['4.0'] && this.inTypeMode) {
1699
- // 4.0 started nesting null types inside a LiteralType node, but we still need to support pre-4.0
1700
- return this.createNode(node, {
1701
- type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword,
1702
- });
1703
- }
1704
- return this.createNode(node, {
1705
- type: ts_estree_1.AST_NODE_TYPES.Literal,
1706
- value: null,
1707
- raw: 'null',
1708
- });
1709
- }
1710
- case SyntaxKind.EmptyStatement:
1711
- return this.createNode(node, {
1712
- type: ts_estree_1.AST_NODE_TYPES.EmptyStatement,
1713
- });
1714
- case SyntaxKind.DebuggerStatement:
1715
- return this.createNode(node, {
1716
- type: ts_estree_1.AST_NODE_TYPES.DebuggerStatement,
1717
- });
1718
- // JSX
1719
- case SyntaxKind.JsxElement:
1720
- return this.createNode(node, {
1721
- type: ts_estree_1.AST_NODE_TYPES.JSXElement,
1722
- openingElement: this.convertChild(node.openingElement),
1723
- closingElement: this.convertChild(node.closingElement),
1724
- children: node.children.map(el => this.convertChild(el)),
1725
- });
1726
- case SyntaxKind.JsxFragment:
1727
- return this.createNode(node, {
1728
- type: ts_estree_1.AST_NODE_TYPES.JSXFragment,
1729
- openingFragment: this.convertChild(node.openingFragment),
1730
- closingFragment: this.convertChild(node.closingFragment),
1731
- children: node.children.map(el => this.convertChild(el)),
1732
- });
1733
- case SyntaxKind.JsxSelfClosingElement: {
1734
- return this.createNode(node, {
1735
- type: ts_estree_1.AST_NODE_TYPES.JSXElement,
1736
- /**
1737
- * Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement,
1738
- * TypeScript does not seem to have the idea of openingElement when tag is self-closing
1739
- */
1740
- openingElement: this.createNode(node, {
1741
- type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement,
1742
- typeParameters: node.typeArguments
1743
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
1744
- : undefined,
1745
- selfClosing: true,
1746
- name: this.convertJSXTagName(node.tagName, node),
1747
- attributes: node.attributes.properties.map(el => this.convertChild(el)),
1748
- range: (0, node_utils_1.getRange)(node, this.ast),
1749
- }),
1750
- closingElement: null,
1751
- children: [],
1752
- });
1753
- }
1754
- case SyntaxKind.JsxOpeningElement:
1755
- return this.createNode(node, {
1756
- type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement,
1757
- typeParameters: node.typeArguments
1758
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
1759
- : undefined,
1760
- selfClosing: false,
1761
- name: this.convertJSXTagName(node.tagName, node),
1762
- attributes: node.attributes.properties.map(el => this.convertChild(el)),
1763
- });
1764
- case SyntaxKind.JsxClosingElement:
1765
- return this.createNode(node, {
1766
- type: ts_estree_1.AST_NODE_TYPES.JSXClosingElement,
1767
- name: this.convertJSXTagName(node.tagName, node),
1768
- });
1769
- case SyntaxKind.JsxOpeningFragment:
1770
- return this.createNode(node, {
1771
- type: ts_estree_1.AST_NODE_TYPES.JSXOpeningFragment,
1772
- });
1773
- case SyntaxKind.JsxClosingFragment:
1774
- return this.createNode(node, {
1775
- type: ts_estree_1.AST_NODE_TYPES.JSXClosingFragment,
1776
- });
1777
- case SyntaxKind.JsxExpression: {
1778
- const expression = node.expression
1779
- ? this.convertChild(node.expression)
1780
- : this.createNode(node, {
1781
- type: ts_estree_1.AST_NODE_TYPES.JSXEmptyExpression,
1782
- range: [node.getStart(this.ast) + 1, node.getEnd() - 1],
1783
- });
1784
- if (node.dotDotDotToken) {
1785
- return this.createNode(node, {
1786
- type: ts_estree_1.AST_NODE_TYPES.JSXSpreadChild,
1787
- expression,
1788
- });
1789
- }
1790
- else {
1791
- return this.createNode(node, {
1792
- type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer,
1793
- expression,
1794
- });
1795
- }
1796
- }
1797
- case SyntaxKind.JsxAttribute: {
1798
- return this.createNode(node, {
1799
- type: ts_estree_1.AST_NODE_TYPES.JSXAttribute,
1800
- name: this.convertJSXNamespaceOrIdentifier(node.name),
1801
- value: this.convertChild(node.initializer),
1802
- });
1803
- }
1804
- case SyntaxKind.JsxText: {
1805
- const start = node.getFullStart();
1806
- const end = node.getEnd();
1807
- const text = this.ast.text.slice(start, end);
1808
- return this.createNode(node, {
1809
- type: ts_estree_1.AST_NODE_TYPES.JSXText,
1810
- value: (0, node_utils_1.unescapeStringLiteralText)(text),
1811
- raw: text,
1812
- range: [start, end],
1813
- });
1814
- }
1815
- case SyntaxKind.JsxSpreadAttribute:
1816
- return this.createNode(node, {
1817
- type: ts_estree_1.AST_NODE_TYPES.JSXSpreadAttribute,
1818
- argument: this.convertChild(node.expression),
1819
- });
1820
- case SyntaxKind.QualifiedName: {
1821
- return this.createNode(node, {
1822
- type: ts_estree_1.AST_NODE_TYPES.TSQualifiedName,
1823
- left: this.convertChild(node.left),
1824
- right: this.convertChild(node.right),
1825
- });
1826
- }
1827
- // TypeScript specific
1828
- case SyntaxKind.TypeReference: {
1829
- return this.createNode(node, {
1830
- type: ts_estree_1.AST_NODE_TYPES.TSTypeReference,
1831
- typeName: this.convertType(node.typeName),
1832
- typeParameters: node.typeArguments
1833
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
1834
- : undefined,
1835
- });
1836
- }
1837
- case SyntaxKind.TypeParameter: {
1838
- return this.createNode(node, {
1839
- type: ts_estree_1.AST_NODE_TYPES.TSTypeParameter,
1840
- name: this.convertType(node.name),
1841
- constraint: node.constraint
1842
- ? this.convertType(node.constraint)
1843
- : undefined,
1844
- default: node.default ? this.convertType(node.default) : undefined,
1845
- in: (0, node_utils_1.hasModifier)(SyntaxKind.InKeyword, node),
1846
- out: (0, node_utils_1.hasModifier)(SyntaxKind.OutKeyword, node),
1847
- });
1848
- }
1849
- case SyntaxKind.ThisType:
1850
- return this.createNode(node, {
1851
- type: ts_estree_1.AST_NODE_TYPES.TSThisType,
1852
- });
1853
- case SyntaxKind.AnyKeyword:
1854
- case SyntaxKind.BigIntKeyword:
1855
- case SyntaxKind.BooleanKeyword:
1856
- case SyntaxKind.NeverKeyword:
1857
- case SyntaxKind.NumberKeyword:
1858
- case SyntaxKind.ObjectKeyword:
1859
- case SyntaxKind.StringKeyword:
1860
- case SyntaxKind.SymbolKeyword:
1861
- case SyntaxKind.UnknownKeyword:
1862
- case SyntaxKind.VoidKeyword:
1863
- case SyntaxKind.UndefinedKeyword:
1864
- case SyntaxKind.IntrinsicKeyword: {
1865
- return this.createNode(node, {
1866
- type: ts_estree_1.AST_NODE_TYPES[`TS${SyntaxKind[node.kind]}`],
1867
- });
1868
- }
1869
- case SyntaxKind.NonNullExpression: {
1870
- const nnExpr = this.createNode(node, {
1871
- type: ts_estree_1.AST_NODE_TYPES.TSNonNullExpression,
1872
- expression: this.convertChild(node.expression),
1873
- });
1874
- return this.convertChainExpression(nnExpr, node);
1875
- }
1876
- case SyntaxKind.TypeLiteral: {
1877
- return this.createNode(node, {
1878
- type: ts_estree_1.AST_NODE_TYPES.TSTypeLiteral,
1879
- members: node.members.map(el => this.convertChild(el)),
1880
- });
1881
- }
1882
- case SyntaxKind.ArrayType: {
1883
- return this.createNode(node, {
1884
- type: ts_estree_1.AST_NODE_TYPES.TSArrayType,
1885
- elementType: this.convertType(node.elementType),
1886
- });
1887
- }
1888
- case SyntaxKind.IndexedAccessType: {
1889
- return this.createNode(node, {
1890
- type: ts_estree_1.AST_NODE_TYPES.TSIndexedAccessType,
1891
- objectType: this.convertType(node.objectType),
1892
- indexType: this.convertType(node.indexType),
1893
- });
1894
- }
1895
- case SyntaxKind.ConditionalType: {
1896
- return this.createNode(node, {
1897
- type: ts_estree_1.AST_NODE_TYPES.TSConditionalType,
1898
- checkType: this.convertType(node.checkType),
1899
- extendsType: this.convertType(node.extendsType),
1900
- trueType: this.convertType(node.trueType),
1901
- falseType: this.convertType(node.falseType),
1902
- });
1903
- }
1904
- case SyntaxKind.TypeQuery: {
1905
- return this.createNode(node, {
1906
- type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery,
1907
- exprName: this.convertType(node.exprName),
1908
- typeParameters: node.typeArguments &&
1909
- this.convertTypeArgumentsToTypeParameters(node.typeArguments, node),
1910
- });
1911
- }
1912
- case SyntaxKind.MappedType: {
1913
- const result = this.createNode(node, {
1914
- type: ts_estree_1.AST_NODE_TYPES.TSMappedType,
1915
- typeParameter: this.convertType(node.typeParameter),
1916
- nameType: (_j = this.convertType(node.nameType)) !== null && _j !== void 0 ? _j : null,
1917
- });
1918
- if (node.readonlyToken) {
1919
- if (node.readonlyToken.kind === SyntaxKind.ReadonlyKeyword) {
1920
- result.readonly = true;
1921
- }
1922
- else {
1923
- result.readonly = (0, node_utils_1.getTextForTokenKind)(node.readonlyToken.kind);
1924
- }
1925
- }
1926
- if (node.questionToken) {
1927
- if (node.questionToken.kind === SyntaxKind.QuestionToken) {
1928
- result.optional = true;
1929
- }
1930
- else {
1931
- result.optional = (0, node_utils_1.getTextForTokenKind)(node.questionToken.kind);
1932
- }
1933
- }
1934
- if (node.type) {
1935
- result.typeAnnotation = this.convertType(node.type);
1936
- }
1937
- return result;
1938
- }
1939
- case SyntaxKind.ParenthesizedExpression:
1940
- return this.convertChild(node.expression, parent);
1941
- case SyntaxKind.TypeAliasDeclaration: {
1942
- const result = this.createNode(node, {
1943
- type: ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration,
1944
- id: this.convertChild(node.name),
1945
- typeAnnotation: this.convertType(node.type),
1946
- });
1947
- if ((0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node)) {
1948
- result.declare = true;
1949
- }
1950
- // Process typeParameters
1951
- if (node.typeParameters) {
1952
- result.typeParameters =
1953
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1954
- }
1955
- // check for exports
1956
- return this.fixExports(node, result);
1957
- }
1958
- case SyntaxKind.MethodSignature: {
1959
- return this.convertMethodSignature(node);
1960
- }
1961
- case SyntaxKind.PropertySignature: {
1962
- const result = this.createNode(node, {
1963
- type: ts_estree_1.AST_NODE_TYPES.TSPropertySignature,
1964
- optional: (0, node_utils_1.isOptional)(node) || undefined,
1965
- computed: (0, node_utils_1.isComputedProperty)(node.name),
1966
- key: this.convertChild(node.name),
1967
- typeAnnotation: node.type
1968
- ? this.convertTypeAnnotation(node.type, node)
1969
- : undefined,
1970
- initializer: this.convertChild(node.initializer) || undefined,
1971
- readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node) || undefined,
1972
- static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node) || undefined,
1973
- export: (0, node_utils_1.hasModifier)(SyntaxKind.ExportKeyword, node) || undefined,
1974
- });
1975
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
1976
- if (accessibility) {
1977
- result.accessibility = accessibility;
1978
- }
1979
- return result;
1980
- }
1981
- case SyntaxKind.IndexSignature: {
1982
- const result = this.createNode(node, {
1983
- type: ts_estree_1.AST_NODE_TYPES.TSIndexSignature,
1984
- parameters: node.parameters.map(el => this.convertChild(el)),
1985
- });
1986
- if (node.type) {
1987
- result.typeAnnotation = this.convertTypeAnnotation(node.type, node);
1988
- }
1989
- if ((0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node)) {
1990
- result.readonly = true;
1991
- }
1992
- const accessibility = (0, node_utils_1.getTSNodeAccessibility)(node);
1993
- if (accessibility) {
1994
- result.accessibility = accessibility;
1995
- }
1996
- if ((0, node_utils_1.hasModifier)(SyntaxKind.ExportKeyword, node)) {
1997
- result.export = true;
1998
- }
1999
- if ((0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node)) {
2000
- result.static = true;
2001
- }
2002
- return result;
2003
- }
2004
- case SyntaxKind.ConstructorType: {
2005
- const result = this.createNode(node, {
2006
- type: ts_estree_1.AST_NODE_TYPES.TSConstructorType,
2007
- params: this.convertParameters(node.parameters),
2008
- abstract: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node),
2009
- });
2010
- if (node.type) {
2011
- result.returnType = this.convertTypeAnnotation(node.type, node);
2012
- }
2013
- if (node.typeParameters) {
2014
- result.typeParameters =
2015
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
2016
- }
2017
- return result;
2018
- }
2019
- case SyntaxKind.FunctionType:
2020
- case SyntaxKind.ConstructSignature:
2021
- case SyntaxKind.CallSignature: {
2022
- const type = node.kind === SyntaxKind.ConstructSignature
2023
- ? ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration
2024
- : node.kind === SyntaxKind.CallSignature
2025
- ? ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration
2026
- : ts_estree_1.AST_NODE_TYPES.TSFunctionType;
2027
- const result = this.createNode(node, {
2028
- type: type,
2029
- params: this.convertParameters(node.parameters),
2030
- });
2031
- if (node.type) {
2032
- result.returnType = this.convertTypeAnnotation(node.type, node);
2033
- }
2034
- if (node.typeParameters) {
2035
- result.typeParameters =
2036
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
2037
- }
2038
- return result;
2039
- }
2040
- case SyntaxKind.ExpressionWithTypeArguments: {
2041
- const parentKind = parent.kind;
2042
- const type = parentKind === SyntaxKind.InterfaceDeclaration
2043
- ? ts_estree_1.AST_NODE_TYPES.TSInterfaceHeritage
2044
- : parentKind === SyntaxKind.HeritageClause
2045
- ? ts_estree_1.AST_NODE_TYPES.TSClassImplements
2046
- : ts_estree_1.AST_NODE_TYPES.TSInstantiationExpression;
2047
- const result = this.createNode(node, {
2048
- type,
2049
- expression: this.convertChild(node.expression),
2050
- });
2051
- if (node.typeArguments) {
2052
- result.typeParameters = this.convertTypeArgumentsToTypeParameters(node.typeArguments, node);
2053
- }
2054
- return result;
2055
- }
2056
- case SyntaxKind.InterfaceDeclaration: {
2057
- const interfaceHeritageClauses = (_k = node.heritageClauses) !== null && _k !== void 0 ? _k : [];
2058
- const result = this.createNode(node, {
2059
- type: ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration,
2060
- body: this.createNode(node, {
2061
- type: ts_estree_1.AST_NODE_TYPES.TSInterfaceBody,
2062
- body: node.members.map(member => this.convertChild(member)),
2063
- range: [node.members.pos - 1, node.end],
2064
- }),
2065
- id: this.convertChild(node.name),
2066
- });
2067
- if (node.typeParameters) {
2068
- result.typeParameters =
2069
- this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
2070
- }
2071
- if (interfaceHeritageClauses.length > 0) {
2072
- const interfaceExtends = [];
2073
- const interfaceImplements = [];
2074
- for (const heritageClause of interfaceHeritageClauses) {
2075
- if (heritageClause.token === SyntaxKind.ExtendsKeyword) {
2076
- for (const n of heritageClause.types) {
2077
- interfaceExtends.push(this.convertChild(n, node));
2078
- }
2079
- }
2080
- else {
2081
- for (const n of heritageClause.types) {
2082
- interfaceImplements.push(this.convertChild(n, node));
2083
- }
2084
- }
2085
- }
2086
- if (interfaceExtends.length) {
2087
- result.extends = interfaceExtends;
2088
- }
2089
- if (interfaceImplements.length) {
2090
- result.implements = interfaceImplements;
2091
- }
2092
- }
2093
- if ((0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node)) {
2094
- result.abstract = true;
2095
- }
2096
- if ((0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node)) {
2097
- result.declare = true;
2098
- }
2099
- // check for exports
2100
- return this.fixExports(node, result);
2101
- }
2102
- case SyntaxKind.TypePredicate: {
2103
- const result = this.createNode(node, {
2104
- type: ts_estree_1.AST_NODE_TYPES.TSTypePredicate,
2105
- asserts: node.assertsModifier !== undefined,
2106
- parameterName: this.convertChild(node.parameterName),
2107
- typeAnnotation: null,
2108
- });
2109
- /**
2110
- * Specific fix for type-guard location data
2111
- */
2112
- if (node.type) {
2113
- result.typeAnnotation = this.convertTypeAnnotation(node.type, node);
2114
- result.typeAnnotation.loc = result.typeAnnotation.typeAnnotation.loc;
2115
- result.typeAnnotation.range =
2116
- result.typeAnnotation.typeAnnotation.range;
2117
- }
2118
- return result;
2119
- }
2120
- case SyntaxKind.ImportType:
2121
- return this.createNode(node, {
2122
- type: ts_estree_1.AST_NODE_TYPES.TSImportType,
2123
- isTypeOf: !!node.isTypeOf,
2124
- parameter: this.convertChild(node.argument),
2125
- qualifier: this.convertChild(node.qualifier),
2126
- typeParameters: node.typeArguments
2127
- ? this.convertTypeArgumentsToTypeParameters(node.typeArguments, node)
2128
- : null,
2129
- });
2130
- case SyntaxKind.EnumDeclaration: {
2131
- const result = this.createNode(node, {
2132
- type: ts_estree_1.AST_NODE_TYPES.TSEnumDeclaration,
2133
- id: this.convertChild(node.name),
2134
- members: node.members.map(el => this.convertChild(el)),
2135
- });
2136
- // apply modifiers first...
2137
- this.applyModifiersToResult(result, node.modifiers);
2138
- // ...then check for exports
2139
- return this.fixExports(node, result);
2140
- }
2141
- case SyntaxKind.EnumMember: {
2142
- const result = this.createNode(node, {
2143
- type: ts_estree_1.AST_NODE_TYPES.TSEnumMember,
2144
- id: this.convertChild(node.name),
2145
- });
2146
- if (node.initializer) {
2147
- result.initializer = this.convertChild(node.initializer);
2148
- }
2149
- if (node.name.kind === ts.SyntaxKind.ComputedPropertyName) {
2150
- result.computed = true;
2151
- }
2152
- return result;
2153
- }
2154
- case SyntaxKind.ModuleDeclaration: {
2155
- const result = this.createNode(node, {
2156
- type: ts_estree_1.AST_NODE_TYPES.TSModuleDeclaration,
2157
- id: this.convertChild(node.name),
2158
- });
2159
- if (node.body) {
2160
- result.body = this.convertChild(node.body);
2161
- }
2162
- // apply modifiers first...
2163
- this.applyModifiersToResult(result, node.modifiers);
2164
- if (node.flags & ts.NodeFlags.GlobalAugmentation) {
2165
- result.global = true;
2166
- }
2167
- // ...then check for exports
2168
- return this.fixExports(node, result);
2169
- }
2170
- // TypeScript specific types
2171
- case SyntaxKind.ParenthesizedType: {
2172
- return this.convertType(node.type);
2173
- }
2174
- case SyntaxKind.UnionType: {
2175
- return this.createNode(node, {
2176
- type: ts_estree_1.AST_NODE_TYPES.TSUnionType,
2177
- types: node.types.map(el => this.convertType(el)),
2178
- });
2179
- }
2180
- case SyntaxKind.IntersectionType: {
2181
- return this.createNode(node, {
2182
- type: ts_estree_1.AST_NODE_TYPES.TSIntersectionType,
2183
- types: node.types.map(el => this.convertType(el)),
2184
- });
2185
- }
2186
- case SyntaxKind.AsExpression: {
2187
- return this.createNode(node, {
2188
- type: ts_estree_1.AST_NODE_TYPES.TSAsExpression,
2189
- expression: this.convertChild(node.expression),
2190
- typeAnnotation: this.convertType(node.type),
2191
- });
2192
- }
2193
- case SyntaxKind.InferType: {
2194
- return this.createNode(node, {
2195
- type: ts_estree_1.AST_NODE_TYPES.TSInferType,
2196
- typeParameter: this.convertType(node.typeParameter),
2197
- });
2198
- }
2199
- case SyntaxKind.LiteralType: {
2200
- if (version_check_1.typescriptVersionIsAtLeast['4.0'] &&
2201
- node.literal.kind === SyntaxKind.NullKeyword) {
2202
- // 4.0 started nesting null types inside a LiteralType node
2203
- // but our AST is designed around the old way of null being a keyword
2204
- return this.createNode(node.literal, {
2205
- type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword,
2206
- });
2207
- }
2208
- else {
2209
- return this.createNode(node, {
2210
- type: ts_estree_1.AST_NODE_TYPES.TSLiteralType,
2211
- literal: this.convertType(node.literal),
2212
- });
2213
- }
2214
- }
2215
- case SyntaxKind.TypeAssertionExpression: {
2216
- return this.createNode(node, {
2217
- type: ts_estree_1.AST_NODE_TYPES.TSTypeAssertion,
2218
- typeAnnotation: this.convertType(node.type),
2219
- expression: this.convertChild(node.expression),
2220
- });
2221
- }
2222
- case SyntaxKind.ImportEqualsDeclaration: {
2223
- return this.createNode(node, {
2224
- type: ts_estree_1.AST_NODE_TYPES.TSImportEqualsDeclaration,
2225
- id: this.convertChild(node.name),
2226
- moduleReference: this.convertChild(node.moduleReference),
2227
- importKind: node.isTypeOnly ? 'type' : 'value',
2228
- isExport: (0, node_utils_1.hasModifier)(SyntaxKind.ExportKeyword, node),
2229
- });
2230
- }
2231
- case SyntaxKind.ExternalModuleReference: {
2232
- return this.createNode(node, {
2233
- type: ts_estree_1.AST_NODE_TYPES.TSExternalModuleReference,
2234
- expression: this.convertChild(node.expression),
2235
- });
2236
- }
2237
- case SyntaxKind.NamespaceExportDeclaration: {
2238
- return this.createNode(node, {
2239
- type: ts_estree_1.AST_NODE_TYPES.TSNamespaceExportDeclaration,
2240
- id: this.convertChild(node.name),
2241
- });
2242
- }
2243
- case SyntaxKind.AbstractKeyword: {
2244
- return this.createNode(node, {
2245
- type: ts_estree_1.AST_NODE_TYPES.TSAbstractKeyword,
2246
- });
2247
- }
2248
- // Tuple
2249
- case SyntaxKind.TupleType: {
2250
- // In TS 4.0, the `elementTypes` property was changed to `elements`.
2251
- // To support both at compile time, we cast to access the newer version
2252
- // if the former does not exist.
2253
- const elementTypes = 'elementTypes' in node
2254
- ? node.elementTypes.map((el) => this.convertType(el))
2255
- : node.elements.map(el => this.convertType(el));
2256
- return this.createNode(node, {
2257
- type: ts_estree_1.AST_NODE_TYPES.TSTupleType,
2258
- elementTypes,
2259
- });
2260
- }
2261
- case SyntaxKind.NamedTupleMember: {
2262
- const member = this.createNode(node, {
2263
- type: ts_estree_1.AST_NODE_TYPES.TSNamedTupleMember,
2264
- elementType: this.convertType(node.type, node),
2265
- label: this.convertChild(node.name, node),
2266
- optional: node.questionToken != null,
2267
- });
2268
- if (node.dotDotDotToken) {
2269
- // adjust the start to account for the "..."
2270
- member.range[0] = member.label.range[0];
2271
- member.loc.start = member.label.loc.start;
2272
- return this.createNode(node, {
2273
- type: ts_estree_1.AST_NODE_TYPES.TSRestType,
2274
- typeAnnotation: member,
2275
- });
2276
- }
2277
- return member;
2278
- }
2279
- case SyntaxKind.OptionalType: {
2280
- return this.createNode(node, {
2281
- type: ts_estree_1.AST_NODE_TYPES.TSOptionalType,
2282
- typeAnnotation: this.convertType(node.type),
2283
- });
2284
- }
2285
- case SyntaxKind.RestType: {
2286
- return this.createNode(node, {
2287
- type: ts_estree_1.AST_NODE_TYPES.TSRestType,
2288
- typeAnnotation: this.convertType(node.type),
2289
- });
2290
- }
2291
- // Template Literal Types
2292
- case SyntaxKind.TemplateLiteralType: {
2293
- const result = this.createNode(node, {
2294
- type: ts_estree_1.AST_NODE_TYPES.TSTemplateLiteralType,
2295
- quasis: [this.convertChild(node.head)],
2296
- types: [],
2297
- });
2298
- node.templateSpans.forEach(templateSpan => {
2299
- result.types.push(this.convertChild(templateSpan.type));
2300
- result.quasis.push(this.convertChild(templateSpan.literal));
2301
- });
2302
- return result;
2303
- }
2304
- case SyntaxKind.ClassStaticBlockDeclaration: {
2305
- return this.createNode(node, {
2306
- type: ts_estree_1.AST_NODE_TYPES.StaticBlock,
2307
- body: this.convertBodyExpressions(node.body.statements, node),
2308
- });
2309
- }
2310
- case SyntaxKind.AssertEntry: {
2311
- return this.createNode(node, {
2312
- type: ts_estree_1.AST_NODE_TYPES.ImportAttribute,
2313
- key: this.convertChild(node.name),
2314
- value: this.convertChild(node.value),
2315
- });
2316
- }
2317
- default:
2318
- return this.deeplyCopy(node);
2319
- }
2320
- }
2321
- }
2322
- exports.Converter = Converter;
2323
- //# sourceMappingURL=convert.js.map