mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Typings cache is internal data structure
This commit is contained in:
parent
23ed9f8423
commit
b0fb73c47c
@ -312,7 +312,8 @@ namespace ts.server {
|
||||
|
||||
export class ProjectService {
|
||||
|
||||
public readonly typingsCache: TypingsCache;
|
||||
/*@internal*/
|
||||
readonly typingsCache: TypingsCache;
|
||||
|
||||
private readonly documentRegistry: DocumentRegistry;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ts.server {
|
||||
globalTypingsCacheLocation: undefined
|
||||
};
|
||||
|
||||
class TypingsCacheEntry {
|
||||
interface TypingsCacheEntry {
|
||||
readonly typeAcquisition: TypeAcquisition;
|
||||
readonly compilerOptions: CompilerOptions;
|
||||
readonly typings: SortedReadonlyArray<string>;
|
||||
@ -80,6 +80,7 @@ namespace ts.server {
|
||||
return !arrayIsEqualTo(imports1, imports2);
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export class TypingsCache {
|
||||
private readonly perProjectCache: Map<TypingsCacheEntry> = createMap<TypingsCacheEntry>();
|
||||
|
||||
|
||||
@ -7602,17 +7602,6 @@ declare namespace ts.server {
|
||||
readonly globalTypingsCacheLocation: string;
|
||||
}
|
||||
const nullTypingsInstaller: ITypingsInstaller;
|
||||
class TypingsCache {
|
||||
private readonly installer;
|
||||
private readonly perProjectCache;
|
||||
constructor(installer: ITypingsInstaller);
|
||||
isKnownTypesPackageName(name: string): boolean;
|
||||
installPackage(options: InstallPackageOptionsWithProject): Promise<ApplyCodeActionCommandResult>;
|
||||
getTypingsForProject(project: Project, unresolvedImports: SortedReadonlyArray<string>, forceRefresh: boolean): SortedReadonlyArray<string>;
|
||||
updateTypingsForProject(projectName: string, compilerOptions: CompilerOptions, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, newTypings: string[]): void;
|
||||
deleteTypingsForProject(projectName: string): void;
|
||||
onProjectClosed(project: Project): void;
|
||||
}
|
||||
}
|
||||
declare namespace ts.server {
|
||||
enum ProjectKind {
|
||||
@ -7960,7 +7949,6 @@ declare namespace ts.server {
|
||||
syntaxOnly?: boolean;
|
||||
}
|
||||
class ProjectService {
|
||||
readonly typingsCache: TypingsCache;
|
||||
private readonly documentRegistry;
|
||||
/**
|
||||
* Container of all known scripts
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user