@interlace/eslint-devkit 2.1.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/package.json +1 -6
  2. package/src/ast/ast-utils.d.ts +1 -1
  3. package/src/ast/module-binding.d.ts +1 -1
  4. package/src/ast/spellings.d.ts +1 -1
  5. package/src/ast/static-expression.d.ts +1 -1
  6. package/src/ast/type-syntax.d.ts +1 -1
  7. package/src/ast-node-types.d.ts +1 -1
  8. package/src/index.d.ts +6 -3
  9. package/src/resolver/dependency-analysis.d.ts +29 -0
  10. package/src/resolver/dependency-analysis.js +1 -1
  11. package/src/resolver/resolver-fallback.d.ts +17 -0
  12. package/src/resolver/resolver-fallback.js +1 -0
  13. package/src/resolver/resolver.d.ts +3 -6
  14. package/src/resolver/resolver.js +1 -1
  15. package/src/rule-creation/browser-escape-hatch-rule.d.ts +1 -1
  16. package/src/rule-creation/connection-config.d.ts +1 -1
  17. package/src/rule-creation/driver-origin.d.ts +1 -1
  18. package/src/rule-creation/generated-file.d.ts +1 -1
  19. package/src/rule-creation/hardcoded-credentials-rule.d.ts +9 -2
  20. package/src/rule-creation/mass-assignment-rule.d.ts +9 -2
  21. package/src/rule-creation/message-source.d.ts +1 -1
  22. package/src/rule-creation/minified-file.d.ts +1 -1
  23. package/src/rule-creation/mock-context.d.ts +1 -1
  24. package/src/rule-creation/module-evidence.d.ts +1 -1
  25. package/src/rule-creation/raw-identifier-rule.d.ts +9 -2
  26. package/src/rule-creation/request-source.d.ts +1 -1
  27. package/src/rule-creation/require-tls-rule.d.ts +8 -2
  28. package/src/rule-creation/rule-creator.d.ts +1 -1
  29. package/src/rule-creation/rule-creator.js +1 -1
  30. package/src/rule-creation/sdk-api-key-rule.d.ts +1 -1
  31. package/src/rule-creation/sdk-flow.d.ts +1 -1
  32. package/src/rule-creation/sql-injection-rule.d.ts +8 -2
  33. package/src/rule-creation/sql-position.d.ts +1 -1
  34. package/src/rule-creation/sql-safety.d.ts +1 -1
  35. package/src/rule-creation/system-prompt-injection-rule.d.ts +1 -1
  36. package/src/rule-creation/unscoped-mutation-rule.d.ts +9 -2
  37. package/src/rule-creation/value-follow.d.ts +1 -1
  38. package/src/security/security-utils.d.ts +1 -1
  39. package/src/types/estree/project-service/createProjectService.d.ts +67 -0
  40. package/src/types/estree/project-service/index.d.ts +3 -0
  41. package/src/types/estree/scope-manager/ScopeManager.d.ts +77 -0
  42. package/src/types/estree/scope-manager/analyze.d.ts +55 -0
  43. package/src/types/estree/scope-manager/definition/CatchClauseDefinition.d.ts +10 -0
  44. package/src/types/estree/scope-manager/definition/ClassNameDefinition.d.ts +10 -0
  45. package/src/types/estree/scope-manager/definition/Definition.d.ts +14 -0
  46. package/src/types/estree/scope-manager/definition/DefinitionBase.d.ts +35 -0
  47. package/src/types/estree/scope-manager/definition/DefinitionType.d.ts +15 -0
  48. package/src/types/estree/scope-manager/definition/FunctionNameDefinition.d.ts +10 -0
  49. package/src/types/estree/scope-manager/definition/ImplicitGlobalVariableDefinition.d.ts +10 -0
  50. package/src/types/estree/scope-manager/definition/ImportBindingDefinition.d.ts +11 -0
  51. package/src/types/estree/scope-manager/definition/ParameterDefinition.d.ts +14 -0
  52. package/src/types/estree/scope-manager/definition/TSEnumMemberDefinition.d.ts +10 -0
  53. package/src/types/estree/scope-manager/definition/TSEnumNameDefinition.d.ts +10 -0
  54. package/src/types/estree/scope-manager/definition/TSModuleNameDefinition.d.ts +10 -0
  55. package/src/types/estree/scope-manager/definition/TypeDefinition.d.ts +10 -0
  56. package/src/types/estree/scope-manager/definition/VariableDefinition.d.ts +10 -0
  57. package/src/types/estree/scope-manager/definition/index.d.ts +15 -0
  58. package/src/types/estree/scope-manager/index.d.ts +10 -0
  59. package/src/types/estree/scope-manager/referencer/PatternVisitor.d.ts +16 -0
  60. package/src/types/estree/scope-manager/referencer/Reference.d.ts +88 -0
  61. package/src/types/estree/scope-manager/referencer/Referencer.d.ts +28 -0
  62. package/src/types/estree/scope-manager/referencer/Visitor.d.ts +13 -0
  63. package/src/types/estree/scope-manager/referencer/VisitorBase.d.ts +22 -0
  64. package/src/types/estree/scope-manager/referencer/index.d.ts +3 -0
  65. package/src/types/estree/scope-manager/scope/BlockScope.d.ts +10 -0
  66. package/src/types/estree/scope-manager/scope/CatchScope.d.ts +10 -0
  67. package/src/types/estree/scope-manager/scope/ClassFieldInitializerScope.d.ts +10 -0
  68. package/src/types/estree/scope-manager/scope/ClassScope.d.ts +10 -0
  69. package/src/types/estree/scope-manager/scope/ClassStaticBlockScope.d.ts +10 -0
  70. package/src/types/estree/scope-manager/scope/ConditionalTypeScope.d.ts +10 -0
  71. package/src/types/estree/scope-manager/scope/ForScope.d.ts +10 -0
  72. package/src/types/estree/scope-manager/scope/FunctionExpressionNameScope.d.ts +11 -0
  73. package/src/types/estree/scope-manager/scope/FunctionScope.d.ts +12 -0
  74. package/src/types/estree/scope-manager/scope/FunctionTypeScope.d.ts +10 -0
  75. package/src/types/estree/scope-manager/scope/GlobalScope.d.ts +18 -0
  76. package/src/types/estree/scope-manager/scope/MappedTypeScope.d.ts +10 -0
  77. package/src/types/estree/scope-manager/scope/ModuleScope.d.ts +10 -0
  78. package/src/types/estree/scope-manager/scope/Scope.d.ts +21 -0
  79. package/src/types/estree/scope-manager/scope/ScopeBase.d.ts +91 -0
  80. package/src/types/estree/scope-manager/scope/ScopeType.d.ts +22 -0
  81. package/src/types/estree/scope-manager/scope/SwitchScope.d.ts +10 -0
  82. package/src/types/estree/scope-manager/scope/TSEnumScope.d.ts +10 -0
  83. package/src/types/estree/scope-manager/scope/TSModuleScope.d.ts +10 -0
  84. package/src/types/estree/scope-manager/scope/TypeScope.d.ts +10 -0
  85. package/src/types/estree/scope-manager/scope/WithScope.d.ts +11 -0
  86. package/src/types/estree/scope-manager/scope/index.d.ts +22 -0
  87. package/src/types/estree/scope-manager/variable/ESLintScopeVariable.d.ts +34 -0
  88. package/src/types/estree/scope-manager/variable/ImplicitLibVariable.d.ts +29 -0
  89. package/src/types/estree/scope-manager/variable/Variable.d.ts +18 -0
  90. package/src/types/estree/scope-manager/variable/VariableBase.d.ts +44 -0
  91. package/src/types/estree/scope-manager/variable/index.d.ts +8 -0
  92. package/src/types/estree/types/generated/ast-spec.d.ts +2215 -0
  93. package/src/types/estree/types/index.d.ts +6 -0
  94. package/src/types/estree/types/lib.d.ts +3 -0
  95. package/src/types/estree/types/parser-options.d.ts +83 -0
  96. package/src/types/estree/types/ts-estree.d.ts +190 -0
  97. package/src/types/estree/typescript-estree/clear-caches.d.ts +11 -0
  98. package/src/types/estree/typescript-estree/create-program/getScriptKind.d.ts +5 -0
  99. package/src/types/estree/typescript-estree/create-program/shared.d.ts +29 -0
  100. package/src/types/estree/typescript-estree/create-program/useProvidedPrograms.d.ts +13 -0
  101. package/src/types/estree/typescript-estree/getModifiers.d.ts +5 -0
  102. package/src/types/estree/typescript-estree/index.d.ts +16 -0
  103. package/src/types/estree/typescript-estree/node-utils.d.ts +191 -0
  104. package/src/types/estree/typescript-estree/parseSettings/ExpiringCache.d.ts +17 -0
  105. package/src/types/estree/typescript-estree/parseSettings/candidateTSConfigRootDirs.d.ts +5 -0
  106. package/src/types/estree/typescript-estree/parseSettings/index.d.ts +128 -0
  107. package/src/types/estree/typescript-estree/parser-options.d.ts +220 -0
  108. package/src/types/estree/typescript-estree/parser.d.ts +19 -0
  109. package/src/types/estree/typescript-estree/simple-traverse.d.ts +13 -0
  110. package/src/types/estree/typescript-estree/ts-estree/estree-to-ts-node-types.d.ts +180 -0
  111. package/src/types/estree/typescript-estree/ts-estree/index.d.ts +5 -0
  112. package/src/types/estree/typescript-estree/ts-estree/ts-nodes.d.ts +19 -0
  113. package/src/types/estree/typescript-estree/version-check.d.ts +6 -0
  114. package/src/types/estree/typescript-estree/version.d.ts +3 -0
  115. package/src/types/estree/typescript-estree/withoutProjectParserOptions.d.ts +11 -0
  116. package/src/types/estree/utils/ast-utils/eslint-utils/PatternMatcher.d.ts +49 -0
  117. package/src/types/estree/utils/ast-utils/eslint-utils/ReferenceTracker.d.ts +73 -0
  118. package/src/types/estree/utils/ast-utils/eslint-utils/astUtilities.d.ts +85 -0
  119. package/src/types/estree/utils/ast-utils/eslint-utils/index.d.ts +7 -0
  120. package/src/types/estree/utils/ast-utils/eslint-utils/predicates.d.ts +33 -0
  121. package/src/types/estree/utils/ast-utils/eslint-utils/scopeAnalysis.d.ts +18 -0
  122. package/src/types/estree/utils/ast-utils/helpers.d.ts +20 -0
  123. package/src/types/estree/utils/ast-utils/index.d.ts +6 -0
  124. package/src/types/estree/utils/ast-utils/misc.d.ts +12 -0
  125. package/src/types/estree/utils/ast-utils/predicates.d.ts +70 -0
  126. package/src/types/estree/utils/eslint-utils/InferTypesFromRule.d.ts +11 -0
  127. package/src/types/estree/utils/eslint-utils/RuleCreator.d.ts +34 -0
  128. package/src/types/estree/utils/eslint-utils/applyDefault.d.ts +10 -0
  129. package/src/types/estree/utils/eslint-utils/deepMerge.d.ts +16 -0
  130. package/src/types/estree/utils/eslint-utils/getParserServices.d.ts +24 -0
  131. package/src/types/estree/utils/eslint-utils/index.d.ts +8 -0
  132. package/src/types/estree/utils/eslint-utils/nullThrows.d.ts +14 -0
  133. package/src/types/estree/utils/index.d.ts +8 -0
  134. package/src/types/estree/utils/json-schema.d.ts +389 -0
  135. package/src/types/estree/utils/ts-eslint/AST.d.ts +10 -0
  136. package/src/types/estree/utils/ts-eslint/Config.d.ts +293 -0
  137. package/src/types/estree/utils/ts-eslint/ESLint.d.ts +9 -0
  138. package/src/types/estree/utils/ts-eslint/Linter.d.ts +257 -0
  139. package/src/types/estree/utils/ts-eslint/Parser.d.ts +96 -0
  140. package/src/types/estree/utils/ts-eslint/ParserOptions.d.ts +3 -0
  141. package/src/types/estree/utils/ts-eslint/Processor.d.ts +65 -0
  142. package/src/types/estree/utils/ts-eslint/Rule.d.ts +633 -0
  143. package/src/types/estree/utils/ts-eslint/RuleTester.d.ts +185 -0
  144. package/src/types/estree/utils/ts-eslint/Scope.d.ts +44 -0
  145. package/src/types/estree/utils/ts-eslint/SourceCode.d.ts +356 -0
  146. package/src/types/estree/utils/ts-eslint/eslint/ESLintShared.d.ts +383 -0
  147. package/src/types/estree/utils/ts-eslint/eslint/FlatESLint.d.ts +89 -0
  148. package/src/types/estree/utils/ts-eslint/eslint/LegacyESLint.d.ts +74 -0
  149. package/src/types/estree/utils/ts-eslint/index.d.ts +13 -0
  150. package/src/types/estree/utils/ts-estree.d.ts +5 -0
  151. package/src/types/estree/utils/ts-utils/NoInfer.d.ts +11 -0
  152. package/src/types/estree/utils/ts-utils/index.d.ts +4 -0
  153. package/src/types/estree/utils/ts-utils/isArray.d.ts +3 -0
  154. package/src/types/estree/visitor-keys/get-keys.d.ts +4 -0
  155. package/src/types/estree/visitor-keys/index.d.ts +4 -0
  156. package/src/types/estree/visitor-keys/visitor-keys.d.ts +4 -0
  157. package/src/types/meta-augmentation.d.ts +1 -1
  158. package/src/types/type-utils.d.ts +1 -1
@@ -0,0 +1,128 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { ProjectServiceAndMetadata } from '../../project-service/index';
4
+ import type * as ts from 'typescript';
5
+ import type { CanonicalPath } from '../create-program/shared';
6
+ import type { TSESTree } from '../ts-estree';
7
+ import type { CacheLike } from './ExpiringCache';
8
+ type DebugModule = 'eslint' | 'typescript' | 'typescript-eslint';
9
+ declare module 'typescript' {
10
+ enum JSDocParsingMode {
11
+ }
12
+ }
13
+ declare module 'typescript/lib/tsserverlibrary' {
14
+ enum JSDocParsingMode {
15
+ }
16
+ }
17
+ /**
18
+ * Internal settings used by the parser to run on a file.
19
+ */
20
+ export interface MutableParseSettings {
21
+ /**
22
+ * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript.
23
+ */
24
+ allowInvalidAST: boolean;
25
+ /**
26
+ * Code of the file being parsed, or raw source file containing it.
27
+ */
28
+ code: string | ts.SourceFile;
29
+ /**
30
+ * Full text of the file being parsed.
31
+ */
32
+ codeFullText: string;
33
+ /**
34
+ * Whether the `comment` parse option is enabled.
35
+ */
36
+ comment: boolean;
37
+ /**
38
+ * If the `comment` parse option is enabled, retrieved comments.
39
+ */
40
+ comments: TSESTree.Comment[];
41
+ /**
42
+ * Which debug areas should be logged.
43
+ */
44
+ debugLevel: Set<DebugModule>;
45
+ /**
46
+ * Whether to error if TypeScript reports a semantic or syntactic error diagnostic.
47
+ */
48
+ errorOnTypeScriptSyntacticAndSemanticIssues: boolean;
49
+ /**
50
+ * Whether to error if an unknown AST node type is encountered.
51
+ */
52
+ errorOnUnknownASTType: boolean;
53
+ /**
54
+ * Any non-standard file extensions which will be parsed.
55
+ */
56
+ extraFileExtensions: string[];
57
+ /**
58
+ * Path of the file being parsed.
59
+ */
60
+ filePath: string;
61
+ /**
62
+ * Sets the external module indicator on the source file.
63
+ * Used by Typescript to determine if a sourceFile is an external module.
64
+ *
65
+ * needed to always parsing `mjs`/`mts` files as ESM
66
+ */
67
+ setExternalModuleIndicator?: (file: ts.SourceFile) => void;
68
+ /**
69
+ * JSDoc parsing style to pass through to TypeScript
70
+ */
71
+ jsDocParsingMode: ts.JSDocParsingMode;
72
+ /**
73
+ * Whether parsing of JSX is enabled.
74
+ *
75
+ * @remarks The applicable file extension is still required.
76
+ */
77
+ jsx: boolean;
78
+ /**
79
+ * Whether to add `loc` information to each node.
80
+ */
81
+ loc: boolean;
82
+ /**
83
+ * Log function, if not `console.log`.
84
+ */
85
+ log: (message: string) => void;
86
+ /**
87
+ * Whether two-way AST node maps are preserved during the AST conversion process.
88
+ */
89
+ preserveNodeMaps?: boolean;
90
+ /**
91
+ * One or more instances of TypeScript Program objects to be used for type information.
92
+ */
93
+ programs: Iterable<ts.Program> | null;
94
+ /**
95
+ * Normalized paths to provided project paths.
96
+ */
97
+ projects: ReadonlyMap<CanonicalPath, string>;
98
+ /**
99
+ * TypeScript server to power program creation.
100
+ */
101
+ projectService: ProjectServiceAndMetadata | undefined;
102
+ /**
103
+ * Whether to add the `range` property to AST nodes.
104
+ */
105
+ range: boolean;
106
+ /**
107
+ * Whether this is part of a single run, rather than a long-running process.
108
+ */
109
+ singleRun: boolean;
110
+ /**
111
+ * Whether deprecated AST properties should skip calling console.warn on accesses.
112
+ */
113
+ suppressDeprecatedPropertyWarnings: boolean;
114
+ /**
115
+ * If the `tokens` parse option is enabled, retrieved tokens.
116
+ */
117
+ tokens: TSESTree.Token[] | null;
118
+ /**
119
+ * Caches searches for TSConfigs from project directories.
120
+ */
121
+ tsconfigMatchCache: CacheLike<string, string>;
122
+ /**
123
+ * The absolute path to the root directory for all provided `project`s.
124
+ */
125
+ tsconfigRootDir: string;
126
+ }
127
+ export type ParseSettings = Readonly<MutableParseSettings>;
128
+ export {};
@@ -0,0 +1,220 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { CacheDurationSeconds, DebugLevel, JSDocParsingMode, ProjectServiceOptions, SourceType } from '../types/index';
4
+ import type * as ts from 'typescript';
5
+ import type { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree';
6
+ interface ParseOptions {
7
+ /**
8
+ * Specify the `sourceType`.
9
+ * For more details, see https://github.com/typescript-eslint/typescript-eslint/pull/9121
10
+ */
11
+ sourceType?: SourceType;
12
+ /**
13
+ * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript.
14
+ * This case only usually occurs when attempting to lint invalid code.
15
+ */
16
+ allowInvalidAST?: boolean;
17
+ /**
18
+ * create a top-level comments array containing all comments
19
+ */
20
+ comment?: boolean;
21
+ /**
22
+ * An array of modules to turn explicit debugging on for.
23
+ * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*`
24
+ * - 'eslint' is the same as setting the env var `DEBUG=eslint:*`
25
+ * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions
26
+ *
27
+ * For convenience, also supports a boolean:
28
+ * - true === ['typescript-eslint']
29
+ * - false === []
30
+ */
31
+ debugLevel?: DebugLevel;
32
+ /**
33
+ * Cause the parser to error if it encounters an unknown AST node type (useful for testing).
34
+ * This case only usually occurs when TypeScript releases new features.
35
+ */
36
+ errorOnUnknownASTType?: boolean;
37
+ /**
38
+ * Absolute (or relative to `cwd`) path to the file being parsed.
39
+ */
40
+ filePath?: string;
41
+ /**
42
+ * If you are using TypeScript version >=5.3 then this option can be used as a performance optimization.
43
+ *
44
+ * The valid values for this rule are:
45
+ * - `'all'` - parse all JSDoc comments, always.
46
+ * - `'none'` - parse no JSDoc comments, ever.
47
+ * - `'type-info'` - parse just JSDoc comments that are required to provide correct type-info. TS will always parse JSDoc in non-TS files, but never in TS files.
48
+ *
49
+ * If you do not rely on JSDoc tags from the TypeScript AST, then you can safely set this to `'none'` to improve performance.
50
+ */
51
+ jsDocParsingMode?: JSDocParsingMode;
52
+ /**
53
+ * Enable parsing of JSX.
54
+ * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html
55
+ *
56
+ * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the
57
+ * TypeScript compiler has its own internal handling for known file extensions.
58
+ *
59
+ * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx
60
+ */
61
+ jsx?: boolean;
62
+ /**
63
+ * Controls whether the `loc` information to each node.
64
+ * The `loc` property is an object which contains the exact line/column the node starts/ends on.
65
+ * This is similar to the `range` property, except it is line/column relative.
66
+ */
67
+ loc?: boolean;
68
+ loggerFn?: ((message: string) => void) | false;
69
+ /**
70
+ * Controls how the parser reacts when run with a TypeScript version that is
71
+ * not officially supported by typescript-eslint.
72
+ * - `'warn'` (default): log a warning via {@link loggerFn}.
73
+ * - `'error'`: throw, regardless of {@link loggerFn}.
74
+ * - `'ignore'`: do nothing.
75
+ */
76
+ onUnsupportedTypeScriptVersion?: 'error' | 'ignore' | 'warn';
77
+ /**
78
+ * Controls whether the `range` property is included on AST nodes.
79
+ * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents.
80
+ * This is similar to the `loc` property, except this is the absolute index.
81
+ */
82
+ range?: boolean;
83
+ /**
84
+ * Set to true to create a top-level array containing all tokens from the file.
85
+ */
86
+ tokens?: boolean;
87
+ /**
88
+ * Whether deprecated AST properties should skip calling console.warn on accesses.
89
+ */
90
+ suppressDeprecatedPropertyWarnings?: boolean;
91
+ }
92
+ interface ParseAndGenerateServicesOptions extends ParseOptions {
93
+ /**
94
+ * Granular control of the expiry lifetime of our internal caches.
95
+ * You can specify the number of seconds as an integer number, or the string
96
+ * 'Infinity' if you never want the cache to expire.
97
+ *
98
+ * By default cache entries will be evicted after 30 seconds, or will persist
99
+ * indefinitely if `disallowAutomaticSingleRunInference = false` AND the parser
100
+ * infers that it is a single run.
101
+ */
102
+ cacheLifetime?: {
103
+ /**
104
+ * Glob resolution for `parserOptions.project` values.
105
+ */
106
+ glob?: CacheDurationSeconds;
107
+ };
108
+ /**
109
+ * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts,
110
+ * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback
111
+ * on a file in an IDE).
112
+ *
113
+ * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction
114
+ * is important because there is significant overhead to managing the so called Watch Programs
115
+ * needed for the long-running use-case.
116
+ *
117
+ * By default, we will use common heuristics to infer whether ESLint is being
118
+ * used as part of a single run. This option disables those heuristics, and
119
+ * therefore the performance optimizations gained by them.
120
+ *
121
+ * In other words, typescript-eslint is faster by default, and this option
122
+ * disables an automatic performance optimization.
123
+ *
124
+ * This setting's default value can be specified by setting a `TSESTREE_SINGLE_RUN`
125
+ * environment variable to `"false"` or `"true"`.
126
+ * Otherwise, the default value is `false`.
127
+ */
128
+ disallowAutomaticSingleRunInference?: boolean;
129
+ /**
130
+ * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors.
131
+ */
132
+ errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
133
+ /**
134
+ * When `project` is provided, this controls the non-standard file extensions which will be parsed.
135
+ * It accepts an array of file extensions, each preceded by a `.`.
136
+ *
137
+ * NOTE: When used with {@link projectService}, full project reloads may occur.
138
+ */
139
+ extraFileExtensions?: string[];
140
+ /**
141
+ * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed.
142
+ * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache.
143
+ */
144
+ filePath?: string;
145
+ /**
146
+ * Allows the user to control whether or not two-way AST node maps are preserved
147
+ * during the AST conversion process.
148
+ *
149
+ * By default: the AST node maps are NOT preserved, unless `project` has been specified,
150
+ * in which case the maps are made available on the returned `parserServices`.
151
+ *
152
+ * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected,
153
+ * regardless of whether or not `project` is in use.
154
+ */
155
+ preserveNodeMaps?: boolean;
156
+ /**
157
+ * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s),
158
+ * or `true` to find the nearest tsconfig.json to the file.
159
+ * If this is provided, type information will be returned.
160
+ *
161
+ * If set to `false`, `null` or `undefined` type information will not be returned.
162
+ *
163
+ * Note that {@link projectService} is now preferred.
164
+ */
165
+ project?: boolean | string | string[] | null;
166
+ /**
167
+ * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from
168
+ * being matched by the globs.
169
+ * This accepts an array of globs to ignore.
170
+ *
171
+ * By default, this is set to ["**\/node_modules/**"]
172
+ */
173
+ projectFolderIgnoreList?: string[];
174
+ /**
175
+ * Whether to create a shared TypeScript project service to power program creation.
176
+ */
177
+ projectService?: boolean | ProjectServiceOptions;
178
+ /**
179
+ * The absolute path to the root directory for all provided `project`s.
180
+ */
181
+ tsconfigRootDir?: string;
182
+ /**
183
+ * An array of one or more instances of TypeScript Program objects to be used for type information.
184
+ * This overrides any program or programs that would have been computed from the `project` option.
185
+ * All linted files must be part of the provided program(s).
186
+ */
187
+ programs?: ts.Program[] | null;
188
+ }
189
+ export type TSESTreeOptions = ParseAndGenerateServicesOptions;
190
+ export interface ParserWeakMap<Key, ValueBase> {
191
+ get<Value extends ValueBase>(key: Key): Value;
192
+ has(key: unknown): boolean;
193
+ }
194
+ export interface ParserWeakMapESTreeToTSNode<Key extends TSESTree.Node = TSESTree.Node> {
195
+ get<KeyBase extends Key>(key: KeyBase): TSESTreeToTSNode<KeyBase>;
196
+ has(key: unknown): boolean;
197
+ }
198
+ export interface ParserServicesBase {
199
+ emitDecoratorMetadata: boolean | undefined;
200
+ experimentalDecorators: boolean | undefined;
201
+ isolatedDeclarations: boolean | undefined;
202
+ }
203
+ export interface ParserServicesNodeMaps {
204
+ esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode;
205
+ tsNodeToESTreeNodeMap: ParserWeakMap<TSNode | TSToken, TSESTree.Node>;
206
+ }
207
+ export interface ParserServicesWithTypeInformation extends ParserServicesNodeMaps, ParserServicesBase {
208
+ getSymbolAtLocation: (node: TSESTree.Node) => ts.Symbol | undefined;
209
+ getTypeAtLocation: (node: TSESTree.Node) => ts.Type;
210
+ getContextualType: (node: TSESTree.Expression) => ts.Type | undefined;
211
+ getResolvedSignature: (node: TSESTree.CallExpression | TSESTree.NewExpression) => ts.Signature | undefined;
212
+ getTypeFromTypeNode: (node: TSESTree.TypeNode) => ts.Type;
213
+ getTypeOfSymbolAtLocation: (symbol: ts.Symbol, node: TSESTree.Node) => ts.Type;
214
+ program: ts.Program;
215
+ }
216
+ export interface ParserServicesWithoutTypeInformation extends ParserServicesNodeMaps, ParserServicesBase {
217
+ program: null;
218
+ }
219
+ export type ParserServices = ParserServicesWithoutTypeInformation | ParserServicesWithTypeInformation;
220
+ export {};
@@ -0,0 +1,19 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type * as ts from 'typescript';
4
+ import type { ParserServices, TSESTreeOptions } from './parser-options';
5
+ import type { TSESTree } from './ts-estree';
6
+ export declare function clearProgramCache(): void;
7
+ export declare function clearDefaultProjectMatchedFiles(): void;
8
+ export type AST<T extends TSESTreeOptions> = (T['comment'] extends true ? {
9
+ comments: TSESTree.Comment[];
10
+ } : {}) & (T['tokens'] extends true ? {
11
+ tokens: TSESTree.Token[];
12
+ } : {}) & TSESTree.Program;
13
+ export interface ParseAndGenerateServicesResult<T extends TSESTreeOptions> {
14
+ ast: AST<T>;
15
+ services: ParserServices;
16
+ }
17
+ export declare function parse<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options?: T): AST<T>;
18
+ export declare function clearParseAndGenerateServicesCalls(): void;
19
+ export declare function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>(code: string | ts.SourceFile, tsestreeOptions: T): ParseAndGenerateServicesResult<T>;
@@ -0,0 +1,13 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { VisitorKeys } from '../visitor-keys/index';
4
+ import type { TSESTree } from './ts-estree';
5
+ type SimpleTraverseOptions = Readonly<{
6
+ enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void;
7
+ visitorKeys?: Readonly<VisitorKeys>;
8
+ } | {
9
+ visitorKeys?: Readonly<VisitorKeys>;
10
+ visitors: Record<string, (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void>;
11
+ }>;
12
+ export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void;
13
+ export {};
@@ -0,0 +1,180 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type { AST_NODE_TYPES, TSESTree } from '../../types/index';
4
+ import type * as ts from 'typescript';
5
+ import type { TSNode } from './ts-nodes';
6
+ export interface EstreeToTsNodeTypes {
7
+ [AST_NODE_TYPES.AccessorProperty]: ts.PropertyDeclaration;
8
+ [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression;
9
+ [AST_NODE_TYPES.ArrayPattern]: ts.ArrayBindingPattern | ts.ArrayLiteralExpression;
10
+ [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction;
11
+ [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression;
12
+ [AST_NODE_TYPES.AssignmentPattern]: ts.BinaryExpression | ts.BindingElement | ts.ParameterDeclaration | ts.ShorthandPropertyAssignment;
13
+ [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression;
14
+ [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression;
15
+ [AST_NODE_TYPES.BlockStatement]: ts.Block;
16
+ [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement;
17
+ [AST_NODE_TYPES.CallExpression]: ts.CallExpression;
18
+ [AST_NODE_TYPES.CatchClause]: ts.CatchClause;
19
+ [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.ElementAccessExpression | ts.NonNullExpression | ts.PropertyAccessExpression;
20
+ [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression;
21
+ [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration;
22
+ [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression;
23
+ [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression;
24
+ [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement;
25
+ [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement;
26
+ [AST_NODE_TYPES.Decorator]: ts.Decorator;
27
+ [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement;
28
+ [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement;
29
+ [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration;
30
+ [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportAssignment | ts.FunctionDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement;
31
+ [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportDeclaration | ts.FunctionDeclaration | ts.ImportEqualsDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement;
32
+ [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier;
33
+ [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement;
34
+ [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement;
35
+ [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement;
36
+ [AST_NODE_TYPES.ForStatement]: ts.ForStatement;
37
+ [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration;
38
+ [AST_NODE_TYPES.FunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration;
39
+ [AST_NODE_TYPES.Identifier]: ts.ConstructorDeclaration | ts.Identifier | ts.Token<ts.SyntaxKind.ImportKeyword | ts.SyntaxKind.NewKeyword>;
40
+ [AST_NODE_TYPES.IfStatement]: ts.IfStatement;
41
+ [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier;
42
+ [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration;
43
+ [AST_NODE_TYPES.ImportAttribute]: 'ImportAttribute' extends keyof typeof ts ? ts.ImportAttribute : ts.AssertEntry;
44
+ [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration;
45
+ [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause;
46
+ [AST_NODE_TYPES.ImportExpression]: ts.CallExpression;
47
+ [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport;
48
+ [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier;
49
+ [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute;
50
+ [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement;
51
+ [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment;
52
+ [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement;
53
+ [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression;
54
+ [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression;
55
+ [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment;
56
+ [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression;
57
+ [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression;
58
+ [AST_NODE_TYPES.JSXNamespacedName]: ts.JsxNamespacedName;
59
+ [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement;
60
+ [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment;
61
+ [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute;
62
+ [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression;
63
+ [AST_NODE_TYPES.JSXText]: ts.JsxText;
64
+ [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement;
65
+ [AST_NODE_TYPES.Literal]: ts.BigIntLiteral | ts.BooleanLiteral | ts.NullLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.StringLiteral;
66
+ [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression;
67
+ [AST_NODE_TYPES.MemberExpression]: ts.ElementAccessExpression | ts.PropertyAccessExpression;
68
+ [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty;
69
+ [AST_NODE_TYPES.MethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration;
70
+ [AST_NODE_TYPES.NewExpression]: ts.NewExpression;
71
+ [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression;
72
+ [AST_NODE_TYPES.ObjectPattern]: ts.ObjectBindingPattern | ts.ObjectLiteralExpression;
73
+ [AST_NODE_TYPES.Program]: ts.SourceFile;
74
+ [AST_NODE_TYPES.Property]: ts.BindingElement | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.PropertyAssignment | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment;
75
+ [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.ParameterDeclaration | ts.SpreadAssignment | ts.SpreadElement;
76
+ [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement;
77
+ [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression;
78
+ [AST_NODE_TYPES.SpreadElement]: ts.SpreadAssignment | ts.SpreadElement;
79
+ [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration;
80
+ [AST_NODE_TYPES.Super]: ts.SuperExpression;
81
+ [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause;
82
+ [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement;
83
+ [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression;
84
+ [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail;
85
+ [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
86
+ [AST_NODE_TYPES.ThisExpression]: ts.Identifier | ts.KeywordTypeNode | ts.ThisExpression;
87
+ [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement;
88
+ [AST_NODE_TYPES.TryStatement]: ts.TryStatement;
89
+ [AST_NODE_TYPES.TSAbstractAccessorProperty]: ts.PropertyDeclaration;
90
+ [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration;
91
+ [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration;
92
+ [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode;
93
+ [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression;
94
+ [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration;
95
+ [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments;
96
+ [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode;
97
+ [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode;
98
+ [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration;
99
+ [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration;
100
+ [AST_NODE_TYPES.TSEnumBody]: ts.EnumDeclaration;
101
+ [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration;
102
+ [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember;
103
+ [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment;
104
+ [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference;
105
+ [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode;
106
+ [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration;
107
+ [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode;
108
+ [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode;
109
+ [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration;
110
+ [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode;
111
+ [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments;
112
+ [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration;
113
+ [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration;
114
+ [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments;
115
+ [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode;
116
+ [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode;
117
+ [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode;
118
+ [AST_NODE_TYPES.TSMethodSignature]: ts.GetAccessorDeclaration | ts.MethodSignature | ts.SetAccessorDeclaration;
119
+ [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock;
120
+ [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration;
121
+ [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember;
122
+ [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration;
123
+ [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression;
124
+ [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode;
125
+ [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration;
126
+ [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature;
127
+ [AST_NODE_TYPES.TSQualifiedName]: ts.Identifier | ts.QualifiedName;
128
+ [AST_NODE_TYPES.TSRestType]: ts.NamedTupleMember | ts.RestTypeNode;
129
+ [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression;
130
+ [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode;
131
+ [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode;
132
+ [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode;
133
+ [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration;
134
+ [AST_NODE_TYPES.TSTypeAnnotation]: undefined;
135
+ [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion;
136
+ [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode;
137
+ [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode;
138
+ [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration;
139
+ [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined;
140
+ [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.CallExpression | ts.ExpressionWithTypeArguments | ts.ImportTypeNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.TaggedTemplateExpression | ts.TypeQueryNode | ts.TypeReferenceNode;
141
+ [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode;
142
+ [AST_NODE_TYPES.TSTypeQuery]: ts.ImportTypeNode | ts.TypeQueryNode;
143
+ [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode;
144
+ [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode;
145
+ [AST_NODE_TYPES.UnaryExpression]: ts.DeleteExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.TypeOfExpression | ts.VoidExpression;
146
+ [AST_NODE_TYPES.UpdateExpression]: ts.PostfixUnaryExpression | ts.PrefixUnaryExpression;
147
+ [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement;
148
+ [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration;
149
+ [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement;
150
+ [AST_NODE_TYPES.WithStatement]: ts.WithStatement;
151
+ [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression;
152
+ [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration;
153
+ [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token<ts.SyntaxKind.AbstractKeyword>;
154
+ [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode;
155
+ [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode;
156
+ [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode;
157
+ [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode;
158
+ [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode;
159
+ [AST_NODE_TYPES.TSNullKeyword]: ts.KeywordTypeNode | ts.NullLiteral;
160
+ [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode;
161
+ [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode;
162
+ [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode;
163
+ [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode;
164
+ [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode;
165
+ [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode;
166
+ [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode;
167
+ [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token<ts.SyntaxKind.AsyncKeyword>;
168
+ [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token<ts.SyntaxKind.DeclareKeyword>;
169
+ [AST_NODE_TYPES.TSExportKeyword]: ts.Token<ts.SyntaxKind.ExportKeyword>;
170
+ [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token<ts.SyntaxKind.PrivateKeyword>;
171
+ [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token<ts.SyntaxKind.ProtectedKeyword>;
172
+ [AST_NODE_TYPES.TSPublicKeyword]: ts.Token<ts.SyntaxKind.PublicKeyword>;
173
+ [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token<ts.SyntaxKind.ReadonlyKeyword>;
174
+ [AST_NODE_TYPES.TSStaticKeyword]: ts.Token<ts.SyntaxKind.StaticKeyword>;
175
+ }
176
+ /**
177
+ * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s).
178
+ * This mapping is based on the internal logic of the parser.
179
+ */
180
+ export type TSESTreeToTSNode<T extends TSESTree.Node = TSESTree.Node> = Extract<ts.Token<ts.SyntaxKind.ImportKeyword | ts.SyntaxKind.NewKeyword> | TSNode, EstreeToTsNodeTypes[T['type']]>;
@@ -0,0 +1,5 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export * from './estree-to-ts-node-types';
4
+ export * from './ts-nodes';
5
+ export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '../../types/index';
@@ -0,0 +1,19 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ import type * as ts from 'typescript';
4
+ declare module 'typescript' {
5
+ interface AssertClause extends ts.ImportAttributes {
6
+ }
7
+ interface AssertEntry extends ts.ImportAttribute {
8
+ }
9
+ interface SatisfiesExpression extends ts.Node {
10
+ }
11
+ interface JsxNamespacedName extends ts.Node {
12
+ }
13
+ interface ImportAttribute extends ts.Node {
14
+ }
15
+ interface ImportAttributes extends ts.Node {
16
+ }
17
+ }
18
+ export type TSToken = ts.Token<ts.SyntaxKind>;
19
+ export type TSNode = ts.ArrayBindingPattern | ts.ArrayLiteralExpression | ts.ArrayTypeNode | ts.ArrowFunction | ts.AsExpression | ts.AssertClause | ts.AssertEntry | ts.AwaitExpression | ts.BigIntLiteral | ts.BinaryExpression | ts.BindingElement | ts.Block | ts.BooleanLiteral | ts.BreakStatement | ts.Bundle | ts.CallExpression | ts.CallSignatureDeclaration | ts.CaseBlock | ts.CaseClause | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.ClassStaticBlockDeclaration | ts.CommaListExpression | ts.ComputedPropertyName | ts.ConditionalExpression | ts.ConditionalTypeNode | ts.ConstructorDeclaration | ts.ConstructorTypeNode | ts.ConstructSignatureDeclaration | ts.ContinueStatement | ts.DebuggerStatement | ts.Decorator | ts.DefaultClause | ts.DeleteExpression | ts.DoStatement | ts.ElementAccessExpression | ts.EmptyStatement | ts.EnumDeclaration | ts.EnumMember | ts.ExportAssignment | ts.ExportDeclaration | ts.ExportSpecifier | ts.ExpressionStatement | ts.ExpressionWithTypeArguments | ts.ExternalModuleReference | ts.ForInStatement | ts.ForOfStatement | ts.ForStatement | ts.FunctionDeclaration | ts.FunctionExpression | ts.FunctionTypeNode | ts.GetAccessorDeclaration | ts.HeritageClause | ts.Identifier | ts.IfStatement | ts.ImportAttribute | ts.ImportAttributes | ts.ImportClause | ts.ImportDeclaration | ts.ImportEqualsDeclaration | ts.ImportExpression | ts.ImportSpecifier | ts.ImportTypeNode | ts.IndexedAccessTypeNode | ts.IndexSignatureDeclaration | ts.InferTypeNode | ts.InterfaceDeclaration | ts.IntersectionTypeNode | ts.JSDoc | ts.JSDocAllType | ts.JSDocAugmentsTag | ts.JSDocAuthorTag | ts.JSDocCallbackTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocFunctionType | ts.JSDocNonNullableType | ts.JSDocNullableType | ts.JSDocOptionalType | ts.JSDocParameterTag | ts.JSDocPropertyTag | ts.JSDocReturnTag | ts.JSDocSignature | ts.JSDocTemplateTag | ts.JSDocThisTag | ts.JSDocTypedefTag | ts.JSDocTypeExpression | ts.JSDocTypeLiteral | ts.JSDocTypeTag | ts.JSDocUnknownTag | ts.JSDocUnknownType | ts.JSDocVariadicType | ts.JsonMinusNumericLiteral | ts.JsxAttribute | ts.JsxClosingElement | ts.JsxClosingFragment | ts.JsxElement | ts.JsxExpression | ts.JsxFragment | ts.JsxNamespacedName | ts.JsxOpeningElement | ts.JsxOpeningFragment | ts.JsxSelfClosingElement | ts.JsxSpreadAttribute | ts.JsxText | ts.KeywordTypeNode | ts.LabeledStatement | ts.LiteralTypeNode | ts.MappedTypeNode | ts.MetaProperty | ts.MethodDeclaration | ts.MethodSignature | ts.MissingDeclaration | ts.Modifier | ts.ModuleBlock | ts.ModuleDeclaration | ts.NamedExports | ts.NamedImports | ts.NamedTupleMember | ts.NamespaceExportDeclaration | ts.NamespaceImport | ts.NewExpression | ts.NonNullExpression | ts.NoSubstitutionTemplateLiteral | ts.NotEmittedStatement | ts.NullLiteral | ts.NumericLiteral | ts.ObjectBindingPattern | ts.ObjectLiteralExpression | ts.OmittedExpression | ts.OptionalTypeNode | ts.ParameterDeclaration | ts.ParenthesizedExpression | ts.ParenthesizedTypeNode | ts.PartiallyEmittedExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.PrivateIdentifier | ts.PropertyAccessExpression | ts.PropertyAssignment | ts.PropertyDeclaration | ts.PropertySignature | ts.QualifiedName | ts.RegularExpressionLiteral | ts.RestTypeNode | ts.ReturnStatement | ts.SatisfiesExpression | ts.SemicolonClassElement | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment | ts.SourceFile | ts.SpreadAssignment | ts.SpreadElement | ts.StringLiteral | ts.SuperExpression | ts.SwitchStatement | ts.SyntheticExpression | ts.TaggedTemplateExpression | ts.TemplateExpression | ts.TemplateHead | ts.TemplateLiteralTypeNode | ts.TemplateMiddle | ts.TemplateSpan | ts.TemplateTail | ts.ThisExpression | ts.ThisTypeNode | ts.ThrowStatement | ts.TryStatement | ts.TupleTypeNode | ts.TypeAliasDeclaration | ts.TypeAssertion | ts.TypeLiteralNode | ts.TypeOfExpression | ts.TypeOperatorNode | ts.TypeParameterDeclaration | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeReferenceNode | ts.UnionTypeNode | ts.VariableDeclaration | ts.VariableDeclarationList | ts.VariableStatement | ts.VoidExpression | ts.WhileStatement | ts.WithStatement | ts.YieldExpression;
@@ -0,0 +1,6 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ declare const versions: readonly ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9', '6.0'];
4
+ type Versions = typeof versions extends ArrayLike<infer U> ? U : never;
5
+ export declare const typescriptVersionIsAtLeast: Record<Versions, boolean>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ export declare const version: string;
@@ -0,0 +1,11 @@
1
+ // Vendored from @typescript-eslint/typescript-estree@8.68.0 (MIT, Copyright JS Foundation and other contributors).
2
+ // Generated by scripts/vendor-estree-types.ts — do not edit; regenerate.
3
+ /**
4
+ * Removes options that prompt the parser to parse the project with type
5
+ * information. In other words, you can use this if you are invoking the parser
6
+ * directly, to ensure that one file will be parsed in isolation, which is much,
7
+ * much faster.
8
+ *
9
+ * @see https://github.com/typescript-eslint/typescript-eslint/issues/8428
10
+ */
11
+ export declare function withoutProjectParserOptions<Options extends object>(opts: Options): Omit<Options, 'EXPERIMENTAL_useProjectService' | 'project' | 'projectService'>;