@@ -90,7 +90,6 @@ export const Structure = {
9090 isTypeParametered < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & TypeParameteredNodeStructure {
9191 switch ( structure . kind ) {
9292 case StructureKind . Class :
93- case StructureKind . ClassStaticBlock :
9493 case StructureKind . Constructor :
9594 case StructureKind . ConstructorOverload :
9695 case StructureKind . GetAccessor :
@@ -190,10 +189,31 @@ export const Structure = {
190189 isClassStaticBlock ( structure : Structure & { kind : StructureKind ; } ) : structure is ClassStaticBlockDeclarationStructure {
191190 return structure . kind === StructureKind . ClassStaticBlock ;
192191 } ,
193- /** Gets if the provided structure is a StaticableNodeStructure . */
194- isStaticable < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & StaticableNodeStructure {
192+ /** Gets if the provided structure is a StatementedNodeStructure . */
193+ isStatemented < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & StatementedNodeStructure {
195194 switch ( structure . kind ) {
196195 case StructureKind . ClassStaticBlock :
196+ case StructureKind . Constructor :
197+ case StructureKind . GetAccessor :
198+ case StructureKind . Method :
199+ case StructureKind . SetAccessor :
200+ case StructureKind . Function :
201+ case StructureKind . Module :
202+ case StructureKind . SourceFile :
203+ return true ;
204+ default :
205+ return false ;
206+ }
207+ } ,
208+ /** Gets if the provided structure is a ConstructorDeclarationStructure. */
209+ isConstructor ( structure : Structure & { kind : StructureKind ; } ) : structure is ConstructorDeclarationStructure {
210+ return structure . kind === StructureKind . Constructor ;
211+ } ,
212+ /** Gets if the provided structure is a ScopedNodeStructure. */
213+ isScoped < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & ScopedNodeStructure {
214+ switch ( structure . kind ) {
215+ case StructureKind . Constructor :
216+ case StructureKind . ConstructorOverload :
197217 case StructureKind . GetAccessor :
198218 case StructureKind . Method :
199219 case StructureKind . MethodOverload :
@@ -207,7 +227,6 @@ export const Structure = {
207227 /** Gets if the provided structure is a FunctionLikeDeclarationStructure. */
208228 isFunctionLike < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & FunctionLikeDeclarationStructure {
209229 switch ( structure . kind ) {
210- case StructureKind . ClassStaticBlock :
211230 case StructureKind . Constructor :
212231 case StructureKind . GetAccessor :
213232 case StructureKind . Method :
@@ -221,7 +240,6 @@ export const Structure = {
221240 /** Gets if the provided structure is a SignaturedDeclarationStructure. */
222241 isSignatured < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & SignaturedDeclarationStructure {
223242 switch ( structure . kind ) {
224- case StructureKind . ClassStaticBlock :
225243 case StructureKind . Constructor :
226244 case StructureKind . ConstructorOverload :
227245 case StructureKind . GetAccessor :
@@ -241,7 +259,6 @@ export const Structure = {
241259 /** Gets if the provided structure is a ParameteredNodeStructure. */
242260 isParametered < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & ParameteredNodeStructure {
243261 switch ( structure . kind ) {
244- case StructureKind . ClassStaticBlock :
245262 case StructureKind . Constructor :
246263 case StructureKind . ConstructorOverload :
247264 case StructureKind . GetAccessor :
@@ -261,7 +278,6 @@ export const Structure = {
261278 /** Gets if the provided structure is a ReturnTypedNodeStructure. */
262279 isReturnTyped < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & ReturnTypedNodeStructure {
263280 switch ( structure . kind ) {
264- case StructureKind . ClassStaticBlock :
265281 case StructureKind . Constructor :
266282 case StructureKind . ConstructorOverload :
267283 case StructureKind . GetAccessor :
@@ -279,41 +295,6 @@ export const Structure = {
279295 return false ;
280296 }
281297 } ,
282- /** Gets if the provided structure is a StatementedNodeStructure. */
283- isStatemented < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & StatementedNodeStructure {
284- switch ( structure . kind ) {
285- case StructureKind . ClassStaticBlock :
286- case StructureKind . Constructor :
287- case StructureKind . GetAccessor :
288- case StructureKind . Method :
289- case StructureKind . SetAccessor :
290- case StructureKind . Function :
291- case StructureKind . Module :
292- case StructureKind . SourceFile :
293- return true ;
294- default :
295- return false ;
296- }
297- } ,
298- /** Gets if the provided structure is a ConstructorDeclarationStructure. */
299- isConstructor ( structure : Structure & { kind : StructureKind ; } ) : structure is ConstructorDeclarationStructure {
300- return structure . kind === StructureKind . Constructor ;
301- } ,
302- /** Gets if the provided structure is a ScopedNodeStructure. */
303- isScoped < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & ScopedNodeStructure {
304- switch ( structure . kind ) {
305- case StructureKind . Constructor :
306- case StructureKind . ConstructorOverload :
307- case StructureKind . GetAccessor :
308- case StructureKind . Method :
309- case StructureKind . MethodOverload :
310- case StructureKind . Property :
311- case StructureKind . SetAccessor :
312- return true ;
313- default :
314- return false ;
315- }
316- } ,
317298 /** Gets if the provided structure is a ConstructorDeclarationOverloadStructure. */
318299 isConstructorDeclarationOverload ( structure : Structure & { kind : StructureKind ; } ) : structure is ConstructorDeclarationOverloadStructure {
319300 return structure . kind === StructureKind . ConstructorOverload ;
@@ -338,6 +319,19 @@ export const Structure = {
338319 return false ;
339320 }
340321 } ,
322+ /** Gets if the provided structure is a StaticableNodeStructure. */
323+ isStaticable < T extends Structure & { kind : StructureKind ; } > ( structure : T ) : structure is T & StaticableNodeStructure {
324+ switch ( structure . kind ) {
325+ case StructureKind . GetAccessor :
326+ case StructureKind . Method :
327+ case StructureKind . MethodOverload :
328+ case StructureKind . Property :
329+ case StructureKind . SetAccessor :
330+ return true ;
331+ default :
332+ return false ;
333+ }
334+ } ,
341335 /** Gets if the provided structure is a MethodDeclarationStructure. */
342336 isMethod ( structure : Structure & { kind : StructureKind ; } ) : structure is MethodDeclarationStructure {
343337 return structure . kind === StructureKind . Method ;
0 commit comments