Skip to content

Commit 077e0bd

Browse files
committed
Merge remote-tracking branch 'Microsoft/master'
2 parents 602e845 + c55d6dc commit 077e0bd

244 files changed

Lines changed: 4448 additions & 2042 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ tests/services/baselines/local/*
2121
tests/baselines/prototyping/local/*
2222
tests/baselines/rwc/*
2323
tests/baselines/test262/*
24-
tests/baselines/reference/projectOutput/*
24+
tests/baselines/reference/projectOutput/*
2525
tests/baselines/local/projectOutput/*
2626
tests/services/baselines/prototyping/local/*
2727
tests/services/browser/typescriptServices.js
2828
scripts/configureNightly.js
2929
scripts/processDiagnosticMessages.d.ts
3030
scripts/processDiagnosticMessages.js
31-
scripts/importDefinitelyTypedTests.js
31+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3232
src/harness/*.js
33+
src/compiler/diagnosticInformationMap.generated.ts
3334
rwc-report.html
3435
*.swp
3536
build.json
@@ -45,8 +46,10 @@ scripts/run.bat
4546
scripts/word2md.js
4647
scripts/ior.js
4748
scripts/*.js.map
49+
scripts/typings/
4850
coverage/
4951
internal/
5052
**/.DS_Store
51-
.settings/*
52-
!.settings/tasks.json
53+
.settings
54+
.vscode/*
55+
!.vscode/tasks.json

.npmignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ doc
33
scripts
44
src
55
tests
6-
Jakefile
6+
Jakefile.js
77
.travis.yml
8-
.settings/
8+
.settings/
9+
.vscode/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Design changes will not be accepted at this time. If you have a design change pr
99
## Legal
1010
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright.
1111

12-
Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to <cla@microsoft.com>. Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request. Please note that we're currently only accepting pull requests of bug fixes rather than new features.
12+
Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.docx](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=822190) or [Microsoft Contribution License Agreement.pdf](https://www.codeplex.com/Download?ProjectName=typescript&DownloadId=921298)), sign, scan, and email it back to <cla@microsoft.com>. Be sure to include your github user name along with the agreement. Once we have received the signed CLA, we'll review the request.
1313

1414
## Housekeeping
1515
Your pull request should:

Jakefile.js

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ function concatenateFiles(destinationFile, sourceFiles) {
206206
var useDebugMode = true;
207207
var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node");
208208
var compilerFilename = "tsc.js";
209+
var LKGCompiler = path.join(LKGDirectory, compilerFilename);
210+
var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
211+
209212
/* Compiles a file from a list of sources
210213
* @param outFile: the target file name
211214
* @param sources: an array of the names of the source files
@@ -220,7 +223,7 @@ var compilerFilename = "tsc.js";
220223
*/
221224
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
222225
file(outFile, prereqs, function() {
223-
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
226+
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
224227
var options = "--module commonjs --noImplicitAny --noEmitOnError";
225228

226229
// Keep comments when specifically requested
@@ -257,7 +260,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
257260
options += " --stripInternal"
258261
}
259262

260-
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
263+
var cmd = host + " " + compilerPath + " " + options + " ";
261264
cmd = cmd + sources.join(" ");
262265
console.log(cmd + "\n");
263266

@@ -328,7 +331,7 @@ compileFile(processDiagnosticMessagesJs,
328331

329332
// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
330333
file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () {
331-
var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson;
334+
var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson;
332335
console.log(cmd);
333336
var ex = jake.createExec([cmd]);
334337
// Add listeners for output and error
@@ -374,7 +377,7 @@ task("setDebugMode", function() {
374377
});
375378

376379
task("configure-nightly", [configureNightlyJs], function() {
377-
var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs;
380+
var cmd = host + " " + configureNightlyJs + " " + packageJson + " " + programTs;
378381
console.log(cmd);
379382
exec(cmd);
380383
}, { async: true });
@@ -386,6 +389,32 @@ task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "r
386389
exec(cmd);
387390
});
388391

392+
var scriptsTsdJson = path.join(scriptsDirectory, "tsd.json");
393+
file(scriptsTsdJson);
394+
395+
task("tsd-scripts", [scriptsTsdJson], function () {
396+
var cmd = "tsd --config " + scriptsTsdJson + " install";
397+
console.log(cmd)
398+
exec(cmd);
399+
}, { async: true })
400+
401+
var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests");
402+
var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js");
403+
var importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts");
404+
405+
file(importDefinitelyTypedTestsTs);
406+
file(importDefinitelyTypedTestsJs, ["tsd-scripts", importDefinitelyTypedTestsTs], function () {
407+
var cmd = host + " " + LKGCompiler + " -p " + importDefinitelyTypedTestsDirectory;
408+
console.log(cmd);
409+
exec(cmd);
410+
}, { async: true });
411+
412+
task("importDefinitelyTypedTests", [importDefinitelyTypedTestsJs], function () {
413+
var cmd = host + " " + importDefinitelyTypedTestsJs + " ./ ../DefinitelyTyped";
414+
console.log(cmd);
415+
exec(cmd);
416+
}, { async: true });
417+
389418
// Local target to build the compiler and services
390419
var tscFile = path.join(builtLocalDirectory, compilerFilename);
391420
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
@@ -780,17 +809,36 @@ task("update-sublime", ["local", serverFile], function() {
780809
jake.cpR(serverFile + ".map", "../TypeScript-Sublime-Plugin/tsserver/");
781810
});
782811

812+
var tslintRuleDir = "scripts/tslint";
813+
var tslintRules = ([
814+
"nextLineRule",
815+
"noInferrableTypesRule",
816+
"noNullRule",
817+
"booleanTriviaRule"
818+
]);
819+
var tslintRulesFiles = tslintRules.map(function(p) {
820+
return path.join(tslintRuleDir, p + ".ts");
821+
});
822+
var tslintRulesOutFiles = tslintRules.map(function(p) {
823+
return path.join(builtLocalDirectory, "tslint", p + ".js");
824+
});
825+
desc("Compiles tslint rules to js");
826+
task("build-rules", tslintRulesOutFiles);
827+
tslintRulesFiles.forEach(function(ruleFile, i) {
828+
compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ true, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint"));
829+
});
830+
783831
// if the codebase were free of linter errors we could make jake runtests
784832
// run this task automatically
785833
desc("Runs tslint on the compiler sources");
786-
task("lint", [], function() {
834+
task("lint", ["build-rules"], function() {
787835
function success(f) { return function() { console.log('SUCCESS: No linter errors in ' + f + '\n'); }};
788836
function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }};
789837

790838
var lintTargets = compilerSources.concat(harnessCoreSources);
791839
for (var i in lintTargets) {
792840
var f = lintTargets[i];
793-
var cmd = 'tslint -c tslint.json ' + f;
841+
var cmd = 'tslint --rules-dir built/local/tslint -c tslint.json ' + f;
794842
exec(cmd, success(f), failure(f));
795843
}
796844
}, { async: true });

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
3030
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
3131
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
3232
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
33-
* Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).
33+
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
3434

3535

3636
## Documentation

lib/lib.core.es6.d.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3965,7 +3965,34 @@ interface ObjectConstructor {
39653965
* Copy the values of all of the enumerable own properties from one or more source objects to a
39663966
* target object. Returns the target object.
39673967
* @param target The target object to copy to.
3968-
* @param sources One or more source objects to copy properties from.
3968+
* @param source The source object from which to copy properties.
3969+
*/
3970+
assign<T, U>(target: T, source: U): T & U;
3971+
3972+
/**
3973+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3974+
* target object. Returns the target object.
3975+
* @param target The target object to copy to.
3976+
* @param source1 The first source object from which to copy properties.
3977+
* @param source2 The second source object from which to copy properties.
3978+
*/
3979+
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
3980+
3981+
/**
3982+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3983+
* target object. Returns the target object.
3984+
* @param target The target object to copy to.
3985+
* @param source1 The first source object from which to copy properties.
3986+
* @param source2 The second source object from which to copy properties.
3987+
* @param source3 The third source object from which to copy properties.
3988+
*/
3989+
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
3990+
3991+
/**
3992+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3993+
* target object. Returns the target object.
3994+
* @param target The target object to copy to.
3995+
* @param sources One or more source objects from which to copy properties
39693996
*/
39703997
assign(target: any, ...sources: any[]): any;
39713998

lib/lib.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,7 +3881,7 @@ declare module Intl {
38813881
currency?: string;
38823882
currencyDisplay?: string;
38833883
useGrouping?: boolean;
3884-
minimumintegerDigits?: number;
3884+
minimumIntegerDigits?: number;
38853885
minimumFractionDigits?: number;
38863886
maximumFractionDigits?: number;
38873887
minimumSignificantDigits?: number;
@@ -3894,7 +3894,7 @@ declare module Intl {
38943894
style: string;
38953895
currency?: string;
38963896
currencyDisplay?: string;
3897-
minimumintegerDigits: number;
3897+
minimumIntegerDigits: number;
38983898
minimumFractionDigits: number;
38993899
maximumFractionDigits: number;
39003900
minimumSignificantDigits?: number;

lib/lib.dom.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ declare module Intl {
5757
currency?: string;
5858
currencyDisplay?: string;
5959
useGrouping?: boolean;
60-
minimumintegerDigits?: number;
60+
minimumIntegerDigits?: number;
6161
minimumFractionDigits?: number;
6262
maximumFractionDigits?: number;
6363
minimumSignificantDigits?: number;
@@ -70,7 +70,7 @@ declare module Intl {
7070
style: string;
7171
currency?: string;
7272
currencyDisplay?: string;
73-
minimumintegerDigits: number;
73+
minimumIntegerDigits: number;
7474
minimumFractionDigits: number;
7575
maximumFractionDigits: number;
7676
minimumSignificantDigits?: number;

lib/lib.es6.d.ts

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3965,7 +3965,34 @@ interface ObjectConstructor {
39653965
* Copy the values of all of the enumerable own properties from one or more source objects to a
39663966
* target object. Returns the target object.
39673967
* @param target The target object to copy to.
3968-
* @param sources One or more source objects to copy properties from.
3968+
* @param source The source object from which to copy properties.
3969+
*/
3970+
assign<T, U>(target: T, source: U): T & U;
3971+
3972+
/**
3973+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3974+
* target object. Returns the target object.
3975+
* @param target The target object to copy to.
3976+
* @param source1 The first source object from which to copy properties.
3977+
* @param source2 The second source object from which to copy properties.
3978+
*/
3979+
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
3980+
3981+
/**
3982+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3983+
* target object. Returns the target object.
3984+
* @param target The target object to copy to.
3985+
* @param source1 The first source object from which to copy properties.
3986+
* @param source2 The second source object from which to copy properties.
3987+
* @param source3 The third source object from which to copy properties.
3988+
*/
3989+
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
3990+
3991+
/**
3992+
* Copy the values of all of the enumerable own properties from one or more source objects to a
3993+
* target object. Returns the target object.
3994+
* @param target The target object to copy to.
3995+
* @param sources One or more source objects from which to copy properties
39693996
*/
39703997
assign(target: any, ...sources: any[]): any;
39713998

@@ -5169,7 +5196,7 @@ declare module Intl {
51695196
currency?: string;
51705197
currencyDisplay?: string;
51715198
useGrouping?: boolean;
5172-
minimumintegerDigits?: number;
5199+
minimumIntegerDigits?: number;
51735200
minimumFractionDigits?: number;
51745201
maximumFractionDigits?: number;
51755202
minimumSignificantDigits?: number;
@@ -5182,7 +5209,7 @@ declare module Intl {
51825209
style: string;
51835210
currency?: string;
51845211
currencyDisplay?: string;
5185-
minimumintegerDigits: number;
5212+
minimumIntegerDigits: number;
51865213
minimumFractionDigits: number;
51875214
maximumFractionDigits: number;
51885215
minimumSignificantDigits?: number;

lib/lib.webworker.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ declare module Intl {
5757
currency?: string;
5858
currencyDisplay?: string;
5959
useGrouping?: boolean;
60-
minimumintegerDigits?: number;
60+
minimumIntegerDigits?: number;
6161
minimumFractionDigits?: number;
6262
maximumFractionDigits?: number;
6363
minimumSignificantDigits?: number;
@@ -70,7 +70,7 @@ declare module Intl {
7070
style: string;
7171
currency?: string;
7272
currencyDisplay?: string;
73-
minimumintegerDigits: number;
73+
minimumIntegerDigits: number;
7474
minimumFractionDigits: number;
7575
maximumFractionDigits: number;
7676
minimumSignificantDigits?: number;

0 commit comments

Comments
 (0)