mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
- renaming resolveTypeDefinitions to discoverTypings for consistency with jsTypings
- simplifying typingOptions parsing after associated managed host changes
This commit is contained in:
parent
0de8f9eeb2
commit
8b9e351525
@ -230,7 +230,7 @@ namespace ts {
|
||||
getPreProcessedFileInfo(fileName: string, sourceText: IScriptSnapshot): string;
|
||||
getTSConfigFileInfo(fileName: string, sourceText: IScriptSnapshot): string;
|
||||
getDefaultCompilationSettings(): string;
|
||||
resolveTypeDefinitions(fileNamesJson: string, globalCachePath: string, projectRootPath: string, typingOptionsJson: string, compilerOptionsJson: string): string;
|
||||
discoverTypings(fileNamesJson: string, globalCachePath: string, projectRootPath: string, typingOptionsJson: string, compilerOptionsJson: string): string;
|
||||
updateNotFoundTypingNames(newTypingsJson: string, globalCachePath: string, projectRootPath: string): string;
|
||||
}
|
||||
|
||||
@ -986,14 +986,11 @@ namespace ts {
|
||||
);
|
||||
}
|
||||
|
||||
public resolveTypeDefinitions(fileNamesJson: string, globalCachePath: string, projectRootPath: string, typingOptionsJson: string, compilerOptionsJson: string): string {
|
||||
public discoverTypings(fileNamesJson: string, globalCachePath: string, projectRootPath: string, typingOptionsJson: string, compilerOptionsJson: string): string {
|
||||
const getCanonicalFileName = createGetCanonicalFileName(/*useCaseSensitivefileNames:*/ false);
|
||||
return this.forwardJSONCall("resolveTypeDefinitions()", () => {
|
||||
return this.forwardJSONCall("discoverTypings()", () => {
|
||||
const cachePath = projectRootPath ? projectRootPath : globalCachePath;
|
||||
const typingOptions = <TypingOptions>JSON.parse(typingOptionsJson);
|
||||
// Convert the include and exclude lists from a semi-colon delimited string to a string array
|
||||
typingOptions.include = typingOptions.include ? typingOptions.include.toString().split(";") : [];
|
||||
typingOptions.exclude = typingOptions.exclude ? typingOptions.exclude.toString().split(";") : [];
|
||||
|
||||
const compilerOptions = <CompilerOptions>JSON.parse(compilerOptionsJson);
|
||||
const fileNames: string[] = JSON.parse(fileNamesJson);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user