Skip to content

Is there a way to check the types of nodes? (similar to @babel/types) #91

@preston-willis

Description

@preston-willis

I'm looking for a way to check node types, and the docs weren't clear if there were any built-in boolean type eval functions

I'm looking for something like this:

import {
  isDeclaration,
  isExpressionStatement,
  isThisExpression,
  isMemberExpression,
  isVariableDeclarator,
  isClassDeclaration,
  isClassExpression,
  isLiteral,
  isFunctionExpression,
  isFunctionDeclaration,
  isProperty,
  isClassProperty,
  isObjectExpression,
  isObjectMethod,
  isClassMethod,
  isTemplateLiteral,
  isFunction as isBabelFunction
} from '@babel/types'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions