@@ -4,13 +4,8 @@ import ts from "typescript";
4
4
5
5
import { TypeStatOptions } from "../options/types.js" ;
6
6
import { arrayify , uniquify } from "../shared/arrays.js" ;
7
- import { isIntrinsicNameType , WellKnownTypeName } from "../shared/typeNodes.js" ;
8
7
import { createProgramConfiguration } from "./createProgramConfiguration.js" ;
9
8
10
- export type WellKnownTypes = Readonly <
11
- Record < WellKnownTypeName , Readonly < ts . Type > >
12
- > ;
13
-
14
9
/**
15
10
* Language service and type information with their backing TypeScript configuration.
16
11
*/
@@ -19,7 +14,6 @@ export interface LanguageServices {
19
14
readonly parsedConfiguration : ts . ParsedCommandLine ;
20
15
readonly printers : Printers ;
21
16
readonly program : ts . Program ;
22
- readonly wellKnownTypes : WellKnownTypes ;
23
17
}
24
18
25
19
export interface Printers {
@@ -97,24 +91,11 @@ export const createLanguageServices = (
97
91
} ,
98
92
} ;
99
93
100
- let wellKnownTypes : undefined | WellKnownTypes ;
101
-
102
94
return {
103
95
languageService,
104
96
parsedConfiguration,
105
97
printers,
106
98
program,
107
- get wellKnownTypes ( ) : WellKnownTypes {
108
- return ( wellKnownTypes ??= program
109
- . getTypeCatalog ( )
110
- . reduce < Record < WellKnownTypeName , ts . Type > > ( ( acc , type ) => {
111
- if ( isIntrinsicNameType ( type ) ) {
112
- acc [ type . intrinsicName ] = type ;
113
- }
114
-
115
- return acc ;
116
- } , { } as WellKnownTypes ) ) ;
117
- } ,
118
99
} ;
119
100
} ;
120
101
/* eslint-enable @typescript-eslint/unbound-method */
0 commit comments