@@ -134,58 +134,59 @@ pub enum AstType {
134134 TSUnionType = 118 ,
135135 TSIntersectionType = 119 ,
136136 TSParenthesizedType = 120 ,
137- TSIndexedAccessType = 121 ,
138- TSNamedTupleMember = 122 ,
139- TSAnyKeyword = 123 ,
140- TSStringKeyword = 124 ,
141- TSBooleanKeyword = 125 ,
142- TSNumberKeyword = 126 ,
143- TSNeverKeyword = 127 ,
144- TSIntrinsicKeyword = 128 ,
145- TSUnknownKeyword = 129 ,
146- TSNullKeyword = 130 ,
147- TSUndefinedKeyword = 131 ,
148- TSVoidKeyword = 132 ,
149- TSSymbolKeyword = 133 ,
150- TSThisType = 134 ,
151- TSObjectKeyword = 135 ,
152- TSBigIntKeyword = 136 ,
153- TSTypeReference = 137 ,
154- TSTypeName = 138 ,
155- TSQualifiedName = 139 ,
156- TSTypeParameterInstantiation = 140 ,
157- TSTypeParameter = 141 ,
158- TSTypeParameterDeclaration = 142 ,
159- TSTypeAliasDeclaration = 143 ,
160- TSClassImplements = 144 ,
161- TSInterfaceDeclaration = 145 ,
162- TSPropertySignature = 146 ,
163- TSCallSignatureDeclaration = 147 ,
164- TSMethodSignature = 148 ,
165- TSConstructSignatureDeclaration = 149 ,
166- TSIndexSignatureName = 150 ,
167- TSInterfaceHeritage = 151 ,
168- TSTypePredicate = 152 ,
169- TSModuleDeclaration = 153 ,
170- TSModuleBlock = 154 ,
171- TSTypeLiteral = 155 ,
172- TSInferType = 156 ,
173- TSTypeQuery = 157 ,
174- TSImportType = 158 ,
175- TSMappedType = 159 ,
176- TSTemplateLiteralType = 160 ,
177- TSAsExpression = 161 ,
178- TSSatisfiesExpression = 162 ,
179- TSTypeAssertion = 163 ,
180- TSImportEqualsDeclaration = 164 ,
181- TSExternalModuleReference = 165 ,
182- TSNonNullExpression = 166 ,
183- Decorator = 167 ,
184- TSExportAssignment = 168 ,
185- TSInstantiationExpression = 169 ,
186- JSDocNullableType = 170 ,
187- JSDocNonNullableType = 171 ,
188- JSDocUnknownType = 172 ,
137+ TSArrayType = 121 ,
138+ TSIndexedAccessType = 122 ,
139+ TSNamedTupleMember = 123 ,
140+ TSAnyKeyword = 124 ,
141+ TSStringKeyword = 125 ,
142+ TSBooleanKeyword = 126 ,
143+ TSNumberKeyword = 127 ,
144+ TSNeverKeyword = 128 ,
145+ TSIntrinsicKeyword = 129 ,
146+ TSUnknownKeyword = 130 ,
147+ TSNullKeyword = 131 ,
148+ TSUndefinedKeyword = 132 ,
149+ TSVoidKeyword = 133 ,
150+ TSSymbolKeyword = 134 ,
151+ TSThisType = 135 ,
152+ TSObjectKeyword = 136 ,
153+ TSBigIntKeyword = 137 ,
154+ TSTypeReference = 138 ,
155+ TSTypeName = 139 ,
156+ TSQualifiedName = 140 ,
157+ TSTypeParameterInstantiation = 141 ,
158+ TSTypeParameter = 142 ,
159+ TSTypeParameterDeclaration = 143 ,
160+ TSTypeAliasDeclaration = 144 ,
161+ TSClassImplements = 145 ,
162+ TSInterfaceDeclaration = 146 ,
163+ TSPropertySignature = 147 ,
164+ TSCallSignatureDeclaration = 148 ,
165+ TSMethodSignature = 149 ,
166+ TSConstructSignatureDeclaration = 150 ,
167+ TSIndexSignatureName = 151 ,
168+ TSInterfaceHeritage = 152 ,
169+ TSTypePredicate = 153 ,
170+ TSModuleDeclaration = 154 ,
171+ TSModuleBlock = 155 ,
172+ TSTypeLiteral = 156 ,
173+ TSInferType = 157 ,
174+ TSTypeQuery = 158 ,
175+ TSImportType = 159 ,
176+ TSMappedType = 160 ,
177+ TSTemplateLiteralType = 161 ,
178+ TSAsExpression = 162 ,
179+ TSSatisfiesExpression = 163 ,
180+ TSTypeAssertion = 164 ,
181+ TSImportEqualsDeclaration = 165 ,
182+ TSExternalModuleReference = 166 ,
183+ TSNonNullExpression = 167 ,
184+ Decorator = 168 ,
185+ TSExportAssignment = 169 ,
186+ TSInstantiationExpression = 170 ,
187+ JSDocNullableType = 171 ,
188+ JSDocNonNullableType = 172 ,
189+ JSDocUnknownType = 173 ,
189190}
190191
191192/// Untyped AST Node Kind
@@ -320,6 +321,7 @@ pub enum AstKind<'a> {
320321 TSUnionType ( & ' a TSUnionType < ' a > ) = AstType :: TSUnionType as u8 ,
321322 TSIntersectionType ( & ' a TSIntersectionType < ' a > ) = AstType :: TSIntersectionType as u8 ,
322323 TSParenthesizedType ( & ' a TSParenthesizedType < ' a > ) = AstType :: TSParenthesizedType as u8 ,
324+ TSArrayType ( & ' a TSArrayType < ' a > ) = AstType :: TSArrayType as u8 ,
323325 TSIndexedAccessType ( & ' a TSIndexedAccessType < ' a > ) = AstType :: TSIndexedAccessType as u8 ,
324326 TSNamedTupleMember ( & ' a TSNamedTupleMember < ' a > ) = AstType :: TSNamedTupleMember as u8 ,
325327 TSAnyKeyword ( & ' a TSAnyKeyword ) = AstType :: TSAnyKeyword as u8 ,
@@ -517,6 +519,7 @@ impl GetSpan for AstKind<'_> {
517519 Self :: TSUnionType ( it) => it. span ( ) ,
518520 Self :: TSIntersectionType ( it) => it. span ( ) ,
519521 Self :: TSParenthesizedType ( it) => it. span ( ) ,
522+ Self :: TSArrayType ( it) => it. span ( ) ,
520523 Self :: TSIndexedAccessType ( it) => it. span ( ) ,
521524 Self :: TSNamedTupleMember ( it) => it. span ( ) ,
522525 Self :: TSAnyKeyword ( it) => it. span ( ) ,
@@ -1179,6 +1182,11 @@ impl<'a> AstKind<'a> {
11791182 if let Self :: TSParenthesizedType ( v) = self { Some ( v) } else { None }
11801183 }
11811184
1185+ #[ inline]
1186+ pub fn as_ts_array_type ( self ) -> Option < & ' a TSArrayType < ' a > > {
1187+ if let Self :: TSArrayType ( v) = self { Some ( v) } else { None }
1188+ }
1189+
11821190 #[ inline]
11831191 pub fn as_ts_indexed_access_type ( self ) -> Option < & ' a TSIndexedAccessType < ' a > > {
11841192 if let Self :: TSIndexedAccessType ( v) = self { Some ( v) } else { None }
0 commit comments