Skip to content

toTSESTreeNode

Views an ESLint (ESTree-typed) node as a TSESTree node.

The node is returned unchanged: only its static type moves.

Import:

import { toTSESTreeNode } from '@mnaoumov/typescript-dev-toolkit/linters/eslint-rules/ts-estree-node';

Signature:

function toTSESTreeNode(node: Node): Node

Parameters:

Parameter Type Description
node Node The node ESLint passed to the rule.

Returns: Node — The same node, typed as a TSESTree node.