@typescript-eslint/typescript-estree
Advanced tools
Comparing version 7.3.2-alpha.7 to 7.3.2-alpha.8
@@ -6,10 +6,19 @@ "use strict"; | ||
if (!program) { | ||
// we always return the node maps because | ||
// (a) they don't require type info and | ||
// (b) they can be useful when using some of TS's internal non-type-aware AST utils | ||
return { program, ...astMaps }; | ||
return { | ||
program, | ||
emitDecoratorMetadata: undefined, | ||
experimentalDecorators: undefined, | ||
// we always return the node maps because | ||
// (a) they don't require type info and | ||
// (b) they can be useful when using some of TS's internal non-type-aware AST utils | ||
...astMaps, | ||
}; | ||
} | ||
const checker = program.getTypeChecker(); | ||
const compilerOptions = program.getCompilerOptions(); | ||
return { | ||
program, | ||
// not set in the config is the same as off | ||
emitDecoratorMetadata: compilerOptions.emitDecoratorMetadata ?? false, | ||
experimentalDecorators: compilerOptions.experimentalDecorators ?? false, | ||
...astMaps, | ||
@@ -16,0 +25,0 @@ getSymbolAtLocation: node => checker.getSymbolAtLocation(astMaps.esTreeNodeToTSNodeMap.get(node)), |
@@ -200,2 +200,6 @@ import type { CacheDurationSeconds, DebugLevel, JSDocParsingMode } from '@typescript-eslint/types'; | ||
} | ||
export interface ParserServicesBase { | ||
emitDecoratorMetadata: boolean | undefined; | ||
experimentalDecorators: boolean | undefined; | ||
} | ||
export interface ParserServicesNodeMaps { | ||
@@ -205,3 +209,3 @@ esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; | ||
} | ||
export interface ParserServicesWithTypeInformation extends ParserServicesNodeMaps { | ||
export interface ParserServicesWithTypeInformation extends ParserServicesNodeMaps, ParserServicesBase { | ||
program: ts.Program; | ||
@@ -211,3 +215,3 @@ getSymbolAtLocation: (node: TSESTree.Node) => ts.Symbol | undefined; | ||
} | ||
export interface ParserServicesWithoutTypeInformation extends ParserServicesNodeMaps { | ||
export interface ParserServicesWithoutTypeInformation extends ParserServicesNodeMaps, ParserServicesBase { | ||
program: null; | ||
@@ -214,0 +218,0 @@ } |
{ | ||
"name": "@typescript-eslint/typescript-estree", | ||
"version": "7.3.2-alpha.7", | ||
"version": "7.3.2-alpha.8", | ||
"description": "A parser that converts TypeScript source code into an ESTree compatible form", | ||
@@ -56,4 +56,4 @@ "files": [ | ||
"dependencies": { | ||
"@typescript-eslint/types": "7.3.2-alpha.7", | ||
"@typescript-eslint/visitor-keys": "7.3.2-alpha.7", | ||
"@typescript-eslint/types": "7.3.2-alpha.8", | ||
"@typescript-eslint/visitor-keys": "7.3.2-alpha.8", | ||
"debug": "^4.3.4", | ||
@@ -60,0 +60,0 @@ "globby": "^11.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
567978
7271
+ Added@typescript-eslint/types@7.3.2-alpha.8(transitive)
+ Added@typescript-eslint/visitor-keys@7.3.2-alpha.8(transitive)
- Removed@typescript-eslint/types@7.3.2-alpha.7(transitive)
- Removed@typescript-eslint/visitor-keys@7.3.2-alpha.7(transitive)