@sourcegraph/eslint-plugin-sourcegraph
Version:
Eslint plugin Sourcegraph
9 lines (8 loc) • 682 B
TypeScript
import { TSESLint } from '@typescript-eslint/experimental-utils';
import { TSESTree } from '@typescript-eslint/types';
import { CompilerNodeToWrappedType, ts } from 'ts-morph';
export declare function getSourceFileFromContext(context: TSESLint.RuleContext<string, unknown[]>): ts.SourceFile;
declare type NodeWrapper = <T extends ts.Node>(node: TSESTree.Node, ctor: unknown) => CompilerNodeToWrappedType<T>;
export declare function getNodeWrapper(context: TSESLint.RuleContext<string, unknown[]>): NodeWrapper;
export declare function getWrappedNode<T extends ts.Node>(context: TSESLint.RuleContext<string, unknown[]>, node: TSESTree.Node): CompilerNodeToWrappedType<T>;
export {};