mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
Merge branch 'master' into release-2.3
This commit is contained in:
commit
4e3e91fbf3
@ -1007,7 +1007,7 @@ namespace ts {
|
||||
let seenKnownKeys = 0;
|
||||
const nameColumn: string[] = [];
|
||||
const descriptionColumn: string[] = [];
|
||||
const knownKesyCount = getOwnKeys(configurations.compilerOptions).length;
|
||||
const knownKeysCount = getOwnKeys(configurations.compilerOptions).length;
|
||||
for (const category in categorizedOptions) {
|
||||
if (nameColumn.length !== 0) {
|
||||
nameColumn.push("");
|
||||
@ -1018,7 +1018,7 @@ namespace ts {
|
||||
for (const option of categorizedOptions[category]) {
|
||||
let optionName;
|
||||
if (hasProperty(configurations.compilerOptions, option.name)) {
|
||||
optionName = `"${option.name}": ${JSON.stringify(configurations.compilerOptions[option.name])}${(seenKnownKeys += 1) === knownKesyCount ? "" : ","}`;
|
||||
optionName = `"${option.name}": ${JSON.stringify(configurations.compilerOptions[option.name])}${(seenKnownKeys += 1) === knownKeysCount ? "" : ","}`;
|
||||
}
|
||||
else {
|
||||
optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`;
|
||||
|
||||
@ -945,7 +945,7 @@ namespace ts {
|
||||
export function assign<T1 extends MapLike<{}>>(t: T1, ...args: any[]): any;
|
||||
export function assign<T1 extends MapLike<{}>>(t: T1, ...args: any[]) {
|
||||
for (const arg of args) {
|
||||
for (const p of getOwnKeys(arg)) {
|
||||
for (const p in arg) if (hasProperty(arg, p)) {
|
||||
t[p] = arg[p];
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,84 +2,84 @@
|
||||
/// <reference path="..\virtualFileSystem.ts" />
|
||||
|
||||
namespace ts {
|
||||
const testContents = createMapFromTemplate({
|
||||
"/dev/tsconfig.json": `{
|
||||
"extends": "./configs/base",
|
||||
"files": [
|
||||
"main.ts",
|
||||
"supplemental.ts"
|
||||
]
|
||||
}`,
|
||||
"/dev/tsconfig.nostrictnull.json": `{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": false
|
||||
}
|
||||
}`,
|
||||
"/dev/configs/base.json": `{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true
|
||||
}
|
||||
}`,
|
||||
"/dev/configs/tests.json": `{
|
||||
"compilerOptions": {
|
||||
"preserveConstEnums": true,
|
||||
"removeComments": false,
|
||||
"sourceMap": true
|
||||
},
|
||||
"exclude": [
|
||||
"../tests/baselines",
|
||||
"../tests/scenarios"
|
||||
],
|
||||
"include": [
|
||||
"../tests/**/*.ts"
|
||||
]
|
||||
}`,
|
||||
"/dev/circular.json": `{
|
||||
"extends": "./circular2",
|
||||
"compilerOptions": {
|
||||
"module": "amd"
|
||||
}
|
||||
}`,
|
||||
"/dev/circular2.json": `{
|
||||
"extends": "./circular",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
}
|
||||
}`,
|
||||
"/dev/missing.json": `{
|
||||
"extends": "./missing2",
|
||||
"compilerOptions": {
|
||||
"types": []
|
||||
}
|
||||
}`,
|
||||
"/dev/failure.json": `{
|
||||
"extends": "./failure2.json",
|
||||
"compilerOptions": {
|
||||
"typeRoots": []
|
||||
}
|
||||
}`,
|
||||
"/dev/failure2.json": `{
|
||||
"excludes": ["*.js"]
|
||||
}`,
|
||||
"/dev/configs/first.json": `{
|
||||
"extends": "./base",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
},
|
||||
"files": ["../main.ts"]
|
||||
}`,
|
||||
"/dev/configs/second.json": `{
|
||||
"extends": "./base",
|
||||
"compilerOptions": {
|
||||
"module": "amd"
|
||||
},
|
||||
"include": ["../supplemental.*"]
|
||||
}`,
|
||||
"/dev/extends.json": `{ "extends": 42 }`,
|
||||
"/dev/extends2.json": `{ "extends": "configs/base" }`,
|
||||
const testContentsJson = createMapFromTemplate({
|
||||
"/dev/tsconfig.json": {
|
||||
extends: "./configs/base",
|
||||
files: [
|
||||
"main.ts",
|
||||
"supplemental.ts"
|
||||
]
|
||||
},
|
||||
"/dev/tsconfig.nostrictnull.json": {
|
||||
extends: "./tsconfig",
|
||||
compilerOptions: {
|
||||
strictNullChecks: false
|
||||
}
|
||||
},
|
||||
"/dev/configs/base.json": {
|
||||
compilerOptions: {
|
||||
allowJs: true,
|
||||
noImplicitAny: true,
|
||||
strictNullChecks: true
|
||||
}
|
||||
},
|
||||
"/dev/configs/tests.json": {
|
||||
compilerOptions: {
|
||||
"preserveConstEnums": true,
|
||||
"removeComments": false,
|
||||
"sourceMap": true
|
||||
},
|
||||
exclude: [
|
||||
"../tests/baselines",
|
||||
"../tests/scenarios"
|
||||
],
|
||||
include: [
|
||||
"../tests/**/*.ts"
|
||||
]
|
||||
},
|
||||
"/dev/circular.json": {
|
||||
extends: "./circular2",
|
||||
compilerOptions: {
|
||||
module: "amd"
|
||||
}
|
||||
},
|
||||
"/dev/circular2.json": {
|
||||
extends: "./circular",
|
||||
compilerOptions: {
|
||||
module: "commonjs"
|
||||
}
|
||||
},
|
||||
"/dev/missing.json": {
|
||||
extends: "./missing2",
|
||||
compilerOptions: {
|
||||
"types": []
|
||||
}
|
||||
},
|
||||
"/dev/failure.json": {
|
||||
extends: "./failure2.json",
|
||||
compilerOptions: {
|
||||
typeRoots: []
|
||||
}
|
||||
},
|
||||
"/dev/failure2.json": {
|
||||
excludes: ["*.js"]
|
||||
},
|
||||
"/dev/configs/first.json": {
|
||||
extends: "./base",
|
||||
compilerOptions: {
|
||||
module: "commonjs"
|
||||
},
|
||||
files: ["../main.ts"]
|
||||
},
|
||||
"/dev/configs/second.json": {
|
||||
extends: "./base",
|
||||
compilerOptions: {
|
||||
module: "amd"
|
||||
},
|
||||
include: ["../supplemental.*"]
|
||||
},
|
||||
"/dev/extends.json": { extends: 42 },
|
||||
"/dev/extends2.json": { extends: "configs/base" },
|
||||
"/dev/main.ts": "",
|
||||
"/dev/supplemental.ts": "",
|
||||
"/dev/tests/unit/spec.ts": "",
|
||||
@ -87,6 +87,7 @@ namespace ts {
|
||||
"/dev/tests/scenarios/first.json": "",
|
||||
"/dev/tests/baselines/first/output.ts": ""
|
||||
});
|
||||
const testContents = mapEntries(testContentsJson, (k, v) => [k, typeof v === "string" ? v : JSON.stringify(v)]);
|
||||
|
||||
const caseInsensitiveBasePath = "c:/dev/";
|
||||
const caseInsensitiveHost = new Utils.MockParseConfigHost(caseInsensitiveBasePath, /*useCaseSensitiveFileNames*/ false, mapEntries(testContents, (key, content) => [`c:${key}`, content]));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user