@@ -140,56 +140,57 @@ pub enum AstType {
140140 TSTupleType = 124 ,
141141 TSNamedTupleMember = 125 ,
142142 TSOptionalType = 126 ,
143- TSAnyKeyword = 127 ,
144- TSStringKeyword = 128 ,
145- TSBooleanKeyword = 129 ,
146- TSNumberKeyword = 130 ,
147- TSNeverKeyword = 131 ,
148- TSIntrinsicKeyword = 132 ,
149- TSUnknownKeyword = 133 ,
150- TSNullKeyword = 134 ,
151- TSUndefinedKeyword = 135 ,
152- TSVoidKeyword = 136 ,
153- TSSymbolKeyword = 137 ,
154- TSThisType = 138 ,
155- TSObjectKeyword = 139 ,
156- TSBigIntKeyword = 140 ,
157- TSTypeReference = 141 ,
158- TSTypeName = 142 ,
159- TSQualifiedName = 143 ,
160- TSTypeParameterInstantiation = 144 ,
161- TSTypeParameter = 145 ,
162- TSTypeParameterDeclaration = 146 ,
163- TSTypeAliasDeclaration = 147 ,
164- TSClassImplements = 148 ,
165- TSInterfaceDeclaration = 149 ,
166- TSPropertySignature = 150 ,
167- TSCallSignatureDeclaration = 151 ,
168- TSMethodSignature = 152 ,
169- TSConstructSignatureDeclaration = 153 ,
170- TSIndexSignatureName = 154 ,
171- TSInterfaceHeritage = 155 ,
172- TSTypePredicate = 156 ,
173- TSModuleDeclaration = 157 ,
174- TSModuleBlock = 158 ,
175- TSTypeLiteral = 159 ,
176- TSInferType = 160 ,
177- TSTypeQuery = 161 ,
178- TSImportType = 162 ,
179- TSMappedType = 163 ,
180- TSTemplateLiteralType = 164 ,
181- TSAsExpression = 165 ,
182- TSSatisfiesExpression = 166 ,
183- TSTypeAssertion = 167 ,
184- TSImportEqualsDeclaration = 168 ,
185- TSExternalModuleReference = 169 ,
186- TSNonNullExpression = 170 ,
187- Decorator = 171 ,
188- TSExportAssignment = 172 ,
189- TSInstantiationExpression = 173 ,
190- JSDocNullableType = 174 ,
191- JSDocNonNullableType = 175 ,
192- JSDocUnknownType = 176 ,
143+ TSRestType = 127 ,
144+ TSAnyKeyword = 128 ,
145+ TSStringKeyword = 129 ,
146+ TSBooleanKeyword = 130 ,
147+ TSNumberKeyword = 131 ,
148+ TSNeverKeyword = 132 ,
149+ TSIntrinsicKeyword = 133 ,
150+ TSUnknownKeyword = 134 ,
151+ TSNullKeyword = 135 ,
152+ TSUndefinedKeyword = 136 ,
153+ TSVoidKeyword = 137 ,
154+ TSSymbolKeyword = 138 ,
155+ TSThisType = 139 ,
156+ TSObjectKeyword = 140 ,
157+ TSBigIntKeyword = 141 ,
158+ TSTypeReference = 142 ,
159+ TSTypeName = 143 ,
160+ TSQualifiedName = 144 ,
161+ TSTypeParameterInstantiation = 145 ,
162+ TSTypeParameter = 146 ,
163+ TSTypeParameterDeclaration = 147 ,
164+ TSTypeAliasDeclaration = 148 ,
165+ TSClassImplements = 149 ,
166+ TSInterfaceDeclaration = 150 ,
167+ TSPropertySignature = 151 ,
168+ TSCallSignatureDeclaration = 152 ,
169+ TSMethodSignature = 153 ,
170+ TSConstructSignatureDeclaration = 154 ,
171+ TSIndexSignatureName = 155 ,
172+ TSInterfaceHeritage = 156 ,
173+ TSTypePredicate = 157 ,
174+ TSModuleDeclaration = 158 ,
175+ TSModuleBlock = 159 ,
176+ TSTypeLiteral = 160 ,
177+ TSInferType = 161 ,
178+ TSTypeQuery = 162 ,
179+ TSImportType = 163 ,
180+ TSMappedType = 164 ,
181+ TSTemplateLiteralType = 165 ,
182+ TSAsExpression = 166 ,
183+ TSSatisfiesExpression = 167 ,
184+ TSTypeAssertion = 168 ,
185+ TSImportEqualsDeclaration = 169 ,
186+ TSExternalModuleReference = 170 ,
187+ TSNonNullExpression = 171 ,
188+ Decorator = 172 ,
189+ TSExportAssignment = 173 ,
190+ TSInstantiationExpression = 174 ,
191+ JSDocNullableType = 175 ,
192+ JSDocNonNullableType = 176 ,
193+ JSDocUnknownType = 177 ,
193194}
194195
195196/// Untyped AST Node Kind
@@ -330,6 +331,7 @@ pub enum AstKind<'a> {
330331 TSTupleType ( & ' a TSTupleType < ' a > ) = AstType :: TSTupleType as u8 ,
331332 TSNamedTupleMember ( & ' a TSNamedTupleMember < ' a > ) = AstType :: TSNamedTupleMember as u8 ,
332333 TSOptionalType ( & ' a TSOptionalType < ' a > ) = AstType :: TSOptionalType as u8 ,
334+ TSRestType ( & ' a TSRestType < ' a > ) = AstType :: TSRestType as u8 ,
333335 TSAnyKeyword ( & ' a TSAnyKeyword ) = AstType :: TSAnyKeyword as u8 ,
334336 TSStringKeyword ( & ' a TSStringKeyword ) = AstType :: TSStringKeyword as u8 ,
335337 TSBooleanKeyword ( & ' a TSBooleanKeyword ) = AstType :: TSBooleanKeyword as u8 ,
@@ -531,6 +533,7 @@ impl GetSpan for AstKind<'_> {
531533 Self :: TSTupleType ( it) => it. span ( ) ,
532534 Self :: TSNamedTupleMember ( it) => it. span ( ) ,
533535 Self :: TSOptionalType ( it) => it. span ( ) ,
536+ Self :: TSRestType ( it) => it. span ( ) ,
534537 Self :: TSAnyKeyword ( it) => it. span ( ) ,
535538 Self :: TSStringKeyword ( it) => it. span ( ) ,
536539 Self :: TSBooleanKeyword ( it) => it. span ( ) ,
@@ -1221,6 +1224,11 @@ impl<'a> AstKind<'a> {
12211224 if let Self :: TSOptionalType ( v) = self { Some ( v) } else { None }
12221225 }
12231226
1227+ #[ inline]
1228+ pub fn as_ts_rest_type ( self ) -> Option < & ' a TSRestType < ' a > > {
1229+ if let Self :: TSRestType ( v) = self { Some ( v) } else { None }
1230+ }
1231+
12241232 #[ inline]
12251233 pub fn as_ts_any_keyword ( self ) -> Option < & ' a TSAnyKeyword > {
12261234 if let Self :: TSAnyKeyword ( v) = self { Some ( v) } else { None }
0 commit comments