Skip to content

Commit 8f6137f

Browse files
committed
JS: Add a couple more type predicates
1 parent a7d6519 commit 8f6137f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • rewrite-javascript/rewrite/src/java

rewrite-javascript/rewrite/src/java/tree.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,8 @@ export const isIf = (tree: any): tree is J.If => tree["kind"] === J.Kind.If;
841841
export const isLambda = (tree: any): tree is J.Lambda => tree["kind"] === J.Kind.Lambda;
842842
export const isLiteral = (tree: any): tree is J.Literal => tree["kind"] === J.Kind.Literal;
843843
export const isMethodDeclaration = (n: any): n is J.MethodDeclaration => n.kind === J.Kind.MethodDeclaration;
844+
export const isMethodInvocation = (n: any): n is J.MethodInvocation => n.kind === J.Kind.MethodInvocation;
845+
export const isNewClass = (n: any): n is J.NewClass => n.kind === J.Kind.NewClass;
844846
export const isVariableDeclarations = (n: any): n is J.VariableDeclarations => n.kind === J.Kind.VariableDeclarations;
845847

846848
export function rightPadded<T extends J | boolean>(t: T, trailing: J.Space, markers?: Markers): J.RightPadded<T> {

0 commit comments

Comments
 (0)