Skip to content

Commit 67b8ca7

Browse files
committed
Merge branch 'master' into report-multiple-overload-errors
2 parents 66244f7 + 105f763 commit 67b8ca7

File tree

126 files changed

+4086
-2072
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4086
-2072
lines changed

.dockerignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
node_modules
2+
.node_modules
3+
built/*
4+
test-args.txt
5+
~*.docx
6+
\#*\#
7+
.\#*
8+
src/harness/*.js
9+
src/compiler/diagnosticInformationMap.generated.ts
10+
src/compiler/diagnosticMessages.generated.json
11+
src/parser/diagnosticInformationMap.generated.ts
12+
src/parser/diagnosticMessages.generated.json
13+
rwc-report.html
14+
*.swp
15+
build.json
16+
*.actual
17+
*.config
18+
scripts/debug.bat
19+
scripts/run.bat
20+
scripts/word2md.js
21+
scripts/buildProtocol.js
22+
scripts/ior.js
23+
scripts/authors.js
24+
scripts/configurePrerelease.js
25+
scripts/open-user-pr.js
26+
scripts/open-cherry-pick-pr.js
27+
scripts/processDiagnosticMessages.d.ts
28+
scripts/processDiagnosticMessages.js
29+
scripts/produceLKG.js
30+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
31+
scripts/generateLocalizedDiagnosticMessages.js
32+
scripts/*.js.map
33+
scripts/typings/
34+
coverage/
35+
internal/
36+
**/.DS_Store
37+
.settings
38+
**/.vs
39+
.idea
40+
yarn.lock
41+
yarn-error.log
42+
.parallelperf.*
43+
.failed-tests
44+
TEST-results.xml
45+
package-lock.json
46+
tests
47+
.vscode
48+
.git

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ package-lock.json
2929
yarn.lock
3030
CONTRIBUTING.md
3131
TEST-results.xml
32+
.dockerignore
33+
Dockerfile

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# We use this dockerfile to build a packed tarfile which we import in our `docker` tests
2+
FROM node:current
3+
COPY . /typescript
4+
WORKDIR /typescript
5+
RUN npm install
6+
RUN npm i -g gulp-cli
7+
RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack .

scripts/open-cherry-pick-pr.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ async function main() {
3636
Component commits:
3737
${logText.trim()}`
3838
const logpath = path.join(__dirname, "../", "logmessage.txt");
39+
const mergebase = runSequence([["git", ["merge-base", "origin/master", currentSha]]]).trim();
3940
runSequence([
4041
["git", ["checkout", "-b", "temp-branch"]],
41-
["git", ["reset", "origin/master", "--soft"]]
42+
["git", ["reset", mergebase, "--soft"]]
4243
]);
4344
fs.writeFileSync(logpath, logText);
4445
runSequence([

src/compiler/checker.ts

Lines changed: 72 additions & 26 deletions
Large diffs are not rendered by default.

src/compiler/commandLineParser.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ namespace ts {
147147
category: Diagnostics.Basic_Options,
148148
description: Diagnostics.Enable_incremental_compilation,
149149
},
150+
{
151+
name: "locale",
152+
type: "string",
153+
category: Diagnostics.Advanced_Options,
154+
description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
155+
},
150156
];
151157

152158
/* @internal */
@@ -698,12 +704,6 @@ namespace ts {
698704
category: Diagnostics.Advanced_Options,
699705
description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
700706
},
701-
{
702-
name: "locale",
703-
type: "string",
704-
category: Diagnostics.Advanced_Options,
705-
description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
706-
},
707707
{
708708
name: "newLine",
709709
type: createMapFromTemplate({
@@ -1171,7 +1171,7 @@ namespace ts {
11711171
export interface ParsedBuildCommand {
11721172
buildOptions: BuildOptions;
11731173
projects: string[];
1174-
errors: ReadonlyArray<Diagnostic>;
1174+
errors: Diagnostic[];
11751175
}
11761176

11771177
/*@internal*/

src/compiler/diagnosticMessages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,6 +2975,10 @@
29752975
"category": "Error",
29762976
"code": 4104
29772977
},
2978+
"Private or protected member '{0}' cannot be accessed on a type parameter.": {
2979+
"category": "Error",
2980+
"code": 4105
2981+
},
29782982

29792983
"The current host does not support the '{0}' option.": {
29802984
"category": "Error",

src/compiler/emitter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ namespace ts {
725725
fileExists: f => host.fileExists(f),
726726
directoryExists: host.directoryExists && (f => host.directoryExists!(f)),
727727
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
728-
getProgramBuildInfo: returnUndefined
728+
getProgramBuildInfo: returnUndefined,
729+
getSourceFileFromReference: returnUndefined,
729730
};
730731
emitFiles(
731732
notImplementedResolver,

src/compiler/moduleNameResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,8 @@ namespace ts {
14871487
}
14881488

14891489
/**
1490-
* LSHost may load a module from a global cache of typings.
1491-
* This is the minumum code needed to expose that functionality; the rest is in LSHost.
1490+
* A host may load a module from a global cache of typings.
1491+
* This is the minumum code needed to expose that functionality; the rest is in the host.
14921492
*/
14931493
/* @internal */
14941494
export function loadModuleFromGlobalCache(moduleName: string, projectName: string | undefined, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations {

src/compiler/program.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,8 @@ namespace ts {
14421442
},
14431443
...(host.directoryExists ? { directoryExists: f => host.directoryExists!(f) } : {}),
14441444
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
1445-
getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo()
1445+
getProgramBuildInfo: () => program.getProgramBuildInfo && program.getProgramBuildInfo(),
1446+
getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref),
14461447
};
14471448
}
14481449

@@ -2127,7 +2128,7 @@ namespace ts {
21272128
}
21282129

21292130
/** This should have similar behavior to 'processSourceFile' without diagnostics or mutation. */
2130-
function getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined {
2131+
function getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined {
21312132
return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), fileName => filesByName.get(toPath(fileName)) || undefined);
21322133
}
21332134

0 commit comments

Comments
 (0)