Merge pull request #4064 from RyanCavanaugh/tsconfigFilesError
Error if 'files' property is not an array
This commit is contained in:
commit
595a8d2734
1 changed files with 4 additions and 1 deletions
|
@ -422,10 +422,13 @@ namespace ts {
|
|||
if (json["files"] instanceof Array) {
|
||||
fileNames = map(<string[]>json["files"], s => combinePaths(basePath, s));
|
||||
}
|
||||
else {
|
||||
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, 'files', 'Array'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
let exclude = json["exclude"] instanceof Array ? map(<string[]>json["exclude"], normalizeSlashes) : undefined;
|
||||
let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude));
|
||||
let sysFiles = host.readDirectory(basePath, ".ts", exclude).concat(host.readDirectory(basePath, ".tsx", exclude));
|
||||
for (let i = 0; i < sysFiles.length; i++) {
|
||||
let name = sysFiles[i];
|
||||
if (fileExtensionIs(name, ".d.ts")) {
|
||||
|
|
Loading…
Reference in a new issue