Skip to content

Commit 63fef50

Browse files
committed
Merge branch 'master' into undefined-unique
2 parents ea7b03d + 9b441d8 commit 63fef50

File tree

3,588 files changed

+85646
-48421
lines changed

Some content is hidden

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

3,588 files changed

+85646
-48421
lines changed

.gitignore

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
node_modules/
22
built/*
3-
tests/cases/*.js
4-
tests/cases/*/*.js
5-
tests/cases/*/*/*.js
6-
tests/cases/*/*/*/*.js
7-
tests/cases/*/*/*/*/*.js
8-
tests/cases/*.js.map
9-
tests/cases/*/*.js.map
10-
tests/cases/*/*/*.js.map
11-
tests/cases/*/*/*/*.js.map
12-
tests/cases/*/*/*/*/*.js.map
133
tests/cases/rwc/*
144
tests/cases/test262/*
155
tests/cases/perf/*

AUTHORS.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TypeScript is authored by:
88
* Basarat Ali Syed
99
* Ben Duffield
1010
* Bill Ticehurst
11+
* Brett Mayen
1112
* Bryan Forbes
1213
* Caitlin Potter
1314
* Chris Bubernak
@@ -17,11 +18,14 @@ TypeScript is authored by:
1718
* Dan Quirk
1819
* Daniel Rosenwasser
1920
* David Li
20-
* Dick van den Brink
21-
* Dirk Bäumer
21+
* Denis Nedelyaev
22+
* Dick van den Brink
23+
* Dirk Bäumer
24+
* Eyas Sharaiha
2225
* Frank Wallis
2326
* Gabriel Isenberg
2427
* Gilad Peleg
28+
* Graeme Wicksted
2529
* Guillaume Salles
2630
* Harald Niesche
2731
* Ingvar Stepanyan
@@ -31,30 +35,39 @@ TypeScript is authored by:
3135
* Jason Ramsay
3236
* Jed Mao
3337
* Johannes Rieken
38+
* John Vilk
3439
* Jonathan Bond-Caron
3540
* Jonathan Park
3641
* Jonathan Turner
3742
* Josh Kalderimis
43+
* Julian Williams
3844
* Kagami Sascha Rosylight
3945
* Keith Mashinter
46+
* Ken Howard
4047
* Kenji Imamula
4148
* Lorant Pinter
49+
* Martin Všetička
4250
* Masahiro Wakame
4351
* Max Deepfield
4452
* Micah Zoltu
4553
* Mohamed Hegazy
54+
* Nathan Shively-Sanders
4655
* Oleg Mihailik
4756
* Oleksandr Chekhovskyi
4857
* Paul van Brenk
4958
* Pedro Maltez
5059
* Philip Bulley
5160
* piloopin
61+
* @progre
62+
* Punya Biswal
5263
* Ron Buckton
5364
* Ryan Cavanaugh
65+
* Ryohei Ikegami
66+
* Sébastien Arod
5467
* Sheetal Nandi
5568
* Shengping Zhong
5669
* Shyyko Serhiy
57-
* Simon Hürlimann
70+
* Simon Hürlimann
5871
* Solal Pirelli
5972
* Stan Thomas
6073
* Steve Lucco
@@ -63,8 +76,10 @@ TypeScript is authored by:
6376
* togru
6477
* Tomas Grubliauskas
6578
* TruongSinh Tran-Nguyen
79+
* Viliv Vane
6680
* Vladimir Matveev
6781
* Wesley Wigham
82+
* York Yao
6883
* Yui Tanglertsampan
6984
* Zev Spitz
70-
* Zhengbo Li
85+
* Zhengbo Li

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ Your pull request should:
3636

3737
The library sources are in: [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib)
3838

39-
To build the library files, run
39+
Library files in `built/local/` are updated by running
4040
```Shell
41-
jake lib
41+
jake
4242
```
4343

44+
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
45+
4446
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
4547

4648
These two files represent the DOM typings and are auto-generated. To make any modifications to them, please submit a PR to https://github.com/Microsoft/TSJS-lib-generator

Jakefile.js

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var compilerSources = [
4040
"utilities.ts",
4141
"binder.ts",
4242
"checker.ts",
43+
"sourcemap.ts",
4344
"declarationEmitter.ts",
4445
"emitter.ts",
4546
"program.ts",
@@ -59,6 +60,7 @@ var servicesSources = [
5960
"utilities.ts",
6061
"binder.ts",
6162
"checker.ts",
63+
"sourcemap.ts",
6264
"declarationEmitter.ts",
6365
"emitter.ts",
6466
"program.ts",
@@ -106,6 +108,17 @@ var serverCoreSources = [
106108
return path.join(serverDirectory, f);
107109
});
108110

111+
var scriptSources = [
112+
"tslint/booleanTriviaRule.ts",
113+
"tslint/nextLineRule.ts",
114+
"tslint/noNullRule.ts",
115+
"tslint/preferConstRule.ts",
116+
"tslint/typeOperatorSpacingRule.ts",
117+
"tslint/noInOperatorRule.ts"
118+
].map(function (f) {
119+
return path.join(scriptsDirectory, f);
120+
});
121+
109122
var serverSources = serverCoreSources.concat(servicesSources);
110123

111124
var languageServiceLibrarySources = [
@@ -365,7 +378,6 @@ file(builtGeneratedDiagnosticMessagesJSON,[generatedDiagnosticMessagesJSON], fun
365378
desc("Generates a diagnostic file in TypeScript based on an input JSON file");
366379
task("generate-diagnostics", [diagnosticInfoMapTs]);
367380

368-
369381
// Publish nightly
370382
var configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
371383
var configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
@@ -466,7 +478,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
466478
var nodeDefinitionsFileContents = definitionFileContents + "\r\nexport = ts;";
467479
fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents);
468480

469-
// Node package definition file to be distributed without the package. Created by replacing
481+
// Node package definition file to be distributed without the package. Created by replacing
470482
// 'ts' namespace with '"typescript"' as a module.
471483
var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
472484
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
@@ -864,7 +876,8 @@ var tslintRules = ([
864876
"noNullRule",
865877
"preferConstRule",
866878
"booleanTriviaRule",
867-
"typeOperatorSpacingRule"
879+
"typeOperatorSpacingRule",
880+
"noInOperatorRule"
868881
]);
869882
var tslintRulesFiles = tslintRules.map(function(p) {
870883
return path.join(tslintRuleDir, p + ".ts");
@@ -875,7 +888,7 @@ var tslintRulesOutFiles = tslintRules.map(function(p) {
875888
desc("Compiles tslint rules to js");
876889
task("build-rules", tslintRulesOutFiles);
877890
tslintRulesFiles.forEach(function(ruleFile, i) {
878-
compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint"));
891+
compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint"));
879892
});
880893

881894
function getLinterOptions() {
@@ -909,18 +922,23 @@ function lintFileAsync(options, path, cb) {
909922

910923
var lintTargets = compilerSources
911924
.concat(harnessCoreSources)
912-
.concat(serverCoreSources);
925+
.concat(serverCoreSources)
926+
.concat(scriptSources);
913927

914928
desc("Runs tslint on the compiler sources");
915929
task("lint", ["build-rules"], function() {
916930
var lintOptions = getLinterOptions();
931+
var failed = 0;
917932
for (var i in lintTargets) {
918933
var result = lintFile(lintOptions, lintTargets[i]);
919934
if (result.failureCount > 0) {
920935
console.log(result.output);
921-
fail('Linter errors.', result.failureCount);
936+
failed += result.failureCount;
922937
}
923938
}
939+
if (failed > 0) {
940+
fail('Linter errors.', failed);
941+
}
924942
});
925943

926944
/**
@@ -937,7 +955,7 @@ function lintWatchFile(filename) {
937955
if (event !== "change") {
938956
return;
939957
}
940-
958+
941959
if (!lintSemaphores[filename]) {
942960
lintSemaphores[filename] = true;
943961
lintFileAsync(getLinterOptions(), filename, function(err, result) {

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
2-
[![npm version](https://badge.fury.io/js/typescript.svg)](http://badge.fury.io/js/typescript)
3-
[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript)
2+
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
3+
[![Downloads](https://img.shields.io/npm/dm/TypeScript.svg)](https://www.npmjs.com/package/typescript)
44

55
# TypeScript
66

Binary file not shown.
936 Bytes
Binary file not shown.

doc/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ x = "hello"; // Ok
13231323
x = 42; // Ok
13241324
x = test; // Error, boolean not assignable
13251325
x = test ? 5 : "five"; // Ok
1326-
x = test ? 0 : false; // Error, number | boolean not asssignable
1326+
x = test ? 0 : false; // Error, number | boolean not assignable
13271327
```
13281328

13291329
it is possible to assign 'x' a value of type `string`, `number`, or the union type `string | number`, but not any other type. To access a value in 'x', a type guard can be used to first narrow the type of 'x' to either `string` or `number`:

lib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Read this!
22

33
These files are not meant to be edited by hand.
4-
If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory.
4+
If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory. Running `jake LKG` will then appropriately update the files in this directory.

0 commit comments

Comments
 (0)