MCPcopy Create free account
hub / github.com/TanStack/query / isNodeOfOneOf

Function isNodeOfOneOf

packages/eslint-plugin-query/src/utils/ast-utils.ts:6–11  ·  view source on GitHub ↗
(
    node: TSESTree.Node,
    types: ReadonlyArray<T>,
  )

Source from the content-addressed store, hash-verified

4
5export const ASTUtils = {
6 isNodeOfOneOf<T extends AST_NODE_TYPES>(
7 node: TSESTree.Node,
8 types: ReadonlyArray<T>,
9 ): node is TSESTree.Node & { type: T } {
10 return types.includes(node.type as T)
11 },
12 isIdentifier(node: TSESTree.Node): node is TSESTree.Identifier {
13 return node.type === AST_NODE_TYPES.Identifier
14 },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected