isClassLike

tcmts.core.ts.isClassLike · #u73thqdj · term · runs anywhere

import { SyntaxKind } from "typescript/ast";
import type { Node } from "typescript/ast";

export const isClassLike = (node: Node | undefined): boolean => !!node && (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression)

used by