Skip to content

Commit b0fb73c

Browse files
committed
Typings cache is internal data structure
1 parent 23ed9f8 commit b0fb73c

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/server/editorServices.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ namespace ts.server {
312312

313313
export class ProjectService {
314314

315-
public readonly typingsCache: TypingsCache;
315+
/*@internal*/
316+
readonly typingsCache: TypingsCache;
316317

317318
private readonly documentRegistry: DocumentRegistry;
318319

src/server/typingsCache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace ts.server {
2424
globalTypingsCacheLocation: undefined
2525
};
2626

27-
class TypingsCacheEntry {
27+
interface TypingsCacheEntry {
2828
readonly typeAcquisition: TypeAcquisition;
2929
readonly compilerOptions: CompilerOptions;
3030
readonly typings: SortedReadonlyArray<string>;
@@ -80,6 +80,7 @@ namespace ts.server {
8080
return !arrayIsEqualTo(imports1, imports2);
8181
}
8282

83+
/*@internal*/
8384
export class TypingsCache {
8485
private readonly perProjectCache: Map<TypingsCacheEntry> = createMap<TypingsCacheEntry>();
8586

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7602,17 +7602,6 @@ declare namespace ts.server {
76027602
readonly globalTypingsCacheLocation: string;
76037603
}
76047604
const nullTypingsInstaller: ITypingsInstaller;
7605-
class TypingsCache {
7606-
private readonly installer;
7607-
private readonly perProjectCache;
7608-
constructor(installer: ITypingsInstaller);
7609-
isKnownTypesPackageName(name: string): boolean;
7610-
installPackage(options: InstallPackageOptionsWithProject): Promise<ApplyCodeActionCommandResult>;
7611-
getTypingsForProject(project: Project, unresolvedImports: SortedReadonlyArray<string>, forceRefresh: boolean): SortedReadonlyArray<string>;
7612-
updateTypingsForProject(projectName: string, compilerOptions: CompilerOptions, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, newTypings: string[]): void;
7613-
deleteTypingsForProject(projectName: string): void;
7614-
onProjectClosed(project: Project): void;
7615-
}
76167605
}
76177606
declare namespace ts.server {
76187607
enum ProjectKind {
@@ -7960,7 +7949,6 @@ declare namespace ts.server {
79607949
syntaxOnly?: boolean;
79617950
}
79627951
class ProjectService {
7963-
readonly typingsCache: TypingsCache;
79647952
private readonly documentRegistry;
79657953
/**
79667954
* Container of all known scripts

0 commit comments

Comments
 (0)