Skip to content

⬅️ Back to Table of Contents

📄 Rule.test-d.ts

📊 Analysis Summary

Metric Count
📦 Imports 2
📑 Type Aliases 4

📚 Table of Contents

🛠️ File Location:

📂 packages/utils/tests/ts-eslint/Rule.test-d.ts

📦 Imports

Name Source
TSESTree @typescript-eslint/types
RuleListener ../../src/ts-eslint

Type Aliases

RuleListenerKeysWithoutIndexSignature

type RuleListenerKeysWithoutIndexSignature = {
  [K in keyof RuleListener as string extends K ? never : K]: K;
};

RuleListenerSelectors

type RuleListenerSelectors = NonNullable<
  RuleListenerKeysWithoutIndexSignature[keyof RuleListenerKeysWithoutIndexSignature]
>;

AllSelectors

type AllSelectors = | `${TSESTree.AST_NODE_TYPES}:exit`
  | `${TSESTree.AST_NODE_TYPES}`;

SelectorsWithWrongNodeType

type SelectorsWithWrongNodeType = {
  [K in TSESTree.AST_NODE_TYPES]: Parameters<
    NonNullable<RuleListener[K]>
  >[0]['type'] extends K
    ? K extends Parameters<NonNullable<RuleListener[K]>>[0]['type']
      ? never
      : K
    : K;
}[TSESTree.AST_NODE_TYPES];