Skip to content

Commit f077be0

Browse files
committed
Merge remote-tracking branch 'origin/master' into analyzer
2 parents e6fcb54 + f06423b commit f077be0

11,143 files changed

Lines changed: 459720 additions & 160315 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 & 15 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/*
@@ -31,15 +21,16 @@ scripts/processDiagnosticMessages.js
3121
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3222
src/harness/*.js
3323
src/compiler/diagnosticInformationMap.generated.ts
24+
src/compiler/diagnosticMessages.generated.json
3425
rwc-report.html
3526
*.swp
3627
build.json
3728
*.actual
3829
tests/webhost/*.d.ts
3930
tests/webhost/webtsc.js
40-
tests/*.js
41-
tests/*.js.map
42-
tests/*.d.ts
31+
tests/cases/**/*.js
32+
tests/cases/**/*.js.map
33+
tests/cases/**/*.d.ts
4334
*.config
4435
scripts/debug.bat
4536
scripts/run.bat
@@ -50,5 +41,6 @@ scripts/typings/
5041
coverage/
5142
internal/
5243
**/.DS_Store
53-
.settings/*
54-
!.settings/tasks.json
44+
.settings
45+
.vscode/*
46+
!.vscode/tasks.json

.npmignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
built
22
doc
3+
lib/README.md
34
scripts
45
src
56
tests
6-
Jakefile
7+
internal
8+
tslint.json
9+
Jakefile.js
10+
.editorconfig
11+
.gitattributes
12+
.settings/
713
.travis.yml
8-
.settings/
14+
.vscode/

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: node_js
22

33
node_js:
4+
- 'stable'
5+
- '4'
46
- '0.10'
57

6-
sudo: false
8+
sudo: false

.vscode/tasks.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@
1818
"problemMatcher": [
1919
"$tsc"
2020
]
21+
},
22+
{
23+
"taskName": "lint-server",
24+
"args": [],
25+
"problemMatcher": {
26+
"owner": "typescript",
27+
"fileLocation": ["relative", "${workspaceRoot}"],
28+
"pattern": {
29+
"regexp": "^(warning|error)\\s+([^(]+)\\s+\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(.*)$",
30+
"severity": 1,
31+
"file": 2,
32+
"location": 3,
33+
"message": 4
34+
},
35+
"watchedTaskBeginsRegExp": "^\\*\\*\\*Lint failure\\*\\*\\*$",
36+
"watchedTaskEndsRegExp": "^\\*\\*\\* Total \\d+ failures\\.$"
37+
},
38+
"showOutput": "always",
39+
"isWatching": true
2140
}
2241
]
2342
}

AUTHORS.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,104 @@ TypeScript is authored by:
22

33
* Adam Freidin
44
* Ahmad Farid
5+
* Akshar Patel
56
* Anders Hejlsberg
67
* Arnav Singh
78
* Arthur Ozga
9+
* Asad Saeeduddin
810
* Basarat Ali Syed
911
* Ben Duffield
1012
* Bill Ticehurst
13+
* Brett Mayen
1114
* Bryan Forbes
1215
* Caitlin Potter
1316
* Chris Bubernak
1417
* Colby Russell
1518
* Colin Snover
1619
* Cyrus Najmabadi
20+
* Dan Corder
1721
* Dan Quirk
1822
* Daniel Rosenwasser
23+
* @dashaus
1924
* David Li
20-
* Dick van den Brink
21-
* Dirk Bäumer
25+
* Denis Nedelyaev
26+
* Dick van den Brink
27+
* Dirk Bäumer
28+
* Dirk Holtwick
29+
* Eyas Sharaiha
30+
* @falsandtru
2231
* Frank Wallis
2332
* Gabriel Isenberg
2433
* Gilad Peleg
34+
* Graeme Wicksted
2535
* Guillaume Salles
36+
* Guy Bedford
2637
* Harald Niesche
38+
* Iain Monro
2739
* Ingvar Stepanyan
2840
* Ivo Gabe de Wolff
2941
* James Whitney
3042
* Jason Freeman
43+
* Jason Killian
3144
* Jason Ramsay
3245
* Jed Mao
46+
* Jeffrey Morlan
3347
* Johannes Rieken
48+
* John Vilk
3449
* Jonathan Bond-Caron
3550
* Jonathan Park
3651
* Jonathan Turner
52+
* Jonathon Smith
3753
* Josh Kalderimis
54+
* Julian Williams
3855
* Kagami Sascha Rosylight
3956
* Keith Mashinter
57+
* Ken Howard
4058
* Kenji Imamula
4159
* Lorant Pinter
60+
* Lucien Greathouse
61+
* Martin Všetička
4262
* Masahiro Wakame
63+
* Mattias Buelens
4364
* Max Deepfield
4465
* Micah Zoltu
4566
* Mohamed Hegazy
67+
* Nathan Shively-Sanders
68+
* Nathan Yee
4669
* Oleg Mihailik
4770
* Oleksandr Chekhovskyi
4871
* Paul van Brenk
72+
* @pcbro
4973
* Pedro Maltez
5074
* Philip Bulley
5175
* piloopin
76+
* @progre
77+
* Punya Biswal
78+
* Richard Sentino
5279
* Ron Buckton
80+
* Rowan Wyborn
5381
* Ryan Cavanaugh
82+
* Ryohei Ikegami
83+
* Sébastien Arod
5484
* Sheetal Nandi
5585
* Shengping Zhong
5686
* Shyyko Serhiy
57-
* Simon Hürlimann
87+
* Simon Hürlimann
5888
* Solal Pirelli
5989
* Stan Thomas
6090
* Steve Lucco
91+
* Thomas Loubiou
6192
* Tien Hoanhtien
93+
* Tim Perry
6294
* Tingan Ho
6395
* togru
6496
* Tomas Grubliauskas
6597
* TruongSinh Tran-Nguyen
98+
* Viliv Vane
6699
* Vladimir Matveev
67100
* Wesley Wigham
101+
* York Yao
68102
* Yui Tanglertsampan
103+
* Yuichi Nukiyama
69104
* Zev Spitz
70-
* Zhengbo Li
105+
* Zhengbo Li

CONTRIBUTING.md

Lines changed: 95 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,63 @@
1+
# Instructions for Logging Issues
2+
3+
## 1. Read the FAQ
4+
5+
Please [read the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) before logging new issues, even if you think you have found a bug.
6+
7+
Issues that ask questions answered in the FAQ will be closed without elaboration.
8+
9+
## 2. Search for Duplicates
10+
11+
[Search the existing issues](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) before logging a new one.
12+
13+
## 3. Do you have a question?
14+
15+
The issue tracker is for **issues**, in other words, bugs and suggestions.
16+
If you have a *question*, please use [Stack Overflow](http://stackoverflow.com/questions/tagged/typescript), [Gitter](https://gitter.im/Microsoft/TypeScript), your favorite search engine, or other resources.
17+
Due to increased traffic, we can no longer answer questions in the issue tracker.
18+
19+
## 4. Did you find a bug?
20+
21+
When logging a bug, please be sure to include the following:
22+
* What version of TypeScript you're using (run `tsc --v`)
23+
* If at all possible, an *isolated* way to reproduce the behavior
24+
* The behavior you expect to see, and the actual behavior
25+
26+
You can try out the nightly build of TypeScript (`npm install typescript@next`) to see if the bug has already been fixed.
27+
28+
## 5. Do you have a suggestion?
29+
30+
We also accept suggestions in the issue tracker.
31+
Be sure to [check the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) and [search](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) first.
32+
33+
In general, things we find useful when reviewing suggestions are:
34+
* A description of the problem you're trying to solve
35+
* An overview of the suggested solution
36+
* Examples of how the suggestion would work in various places
37+
* Code examples showing e.g. "this would be an error, this wouldn't"
38+
* Code examples showing the generated JavaScript (if applicable)
39+
* If relevant, precedent in other languages can be useful for establishing context and expected behavior
40+
41+
# Instructions for Contributing Code
42+
143
## Contributing bug fixes
44+
245
TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
346

447
## Contributing features
48+
549
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (marked as "Milestone == Community" by a TypeScript coordinator with the message "Approved") in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
650

751
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
852

953
## Legal
54+
1055
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.
1156

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.
57+
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.
1358

1459
## Housekeeping
60+
1561
Your pull request should:
1662

1763
* Include a description of what your change intends to do
@@ -25,11 +71,27 @@ Your pull request should:
2571
* Tests should include reasonable permutations of the target fix/change
2672
* Include baseline changes with your change
2773
* All changed code must have 100% code coverage
28-
* Follow the code conventions descriped in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
74+
* Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
2975
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
3076

77+
## Contributing `lib.d.ts` fixes
78+
79+
The library sources are in: [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib)
80+
81+
Library files in `built/local/` are updated by running
82+
```Shell
83+
jake
84+
```
85+
86+
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
87+
88+
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
89+
90+
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
91+
3192
## Running the Tests
32-
To run all tests, invoke the runtests target using jake:
93+
94+
To run all tests, invoke the `runtests` target using jake:
3395

3496
```Shell
3597
jake runtests
@@ -47,23 +109,42 @@ e.g. to run all compiler baseline tests:
47109
jake runtests tests=compiler
48110
```
49111

50-
or to run specifc test: `tests\cases\compiler\2dArrays.ts`
112+
or to run a specific test: `tests\cases\compiler\2dArrays.ts`
51113

52114
```Shell
53115
jake runtests tests=2dArrays
54116
```
55117

118+
## Debugging the tests
119+
120+
To debug the tests, invoke the `runtests-browser` task from jake.
121+
You will probably only want to debug one test at a time:
122+
123+
```Shell
124+
jake runtests-browser tests=2dArrays
125+
```
126+
127+
You can specify which browser to use for debugging. Currently Chrome and IE are supported:
128+
129+
```Shell
130+
jake runtests-browser tests=2dArrays browser=chrome
131+
```
132+
133+
You can debug with VS Code or Node instead with `jake runtests debug=true`:
134+
135+
```Shell
136+
jake runtests tests=2dArrays debug=true
137+
```
138+
56139
## Adding a Test
57-
To add a new testcase, simply place a `.ts` file in `tests\cases\compiler` containing code that exemplifies the bugfix or change you are making.
58140

59-
These files support metadata tags in the format `// @metaDataName: value`. The supported names and values are:
141+
To add a new test case, simply place a `.ts` file in `tests\cases\compiler` containing code that exemplifies the bugfix or change you are making.
60142

61-
* `comments`, `sourcemap`, `noimplicitany`, `declaration`: true or false (corresponds to the compiler command-line options of the same name)
62-
* `target`: ES3 or ES5 (same as compiler)
63-
* `out`, outDir: path (same as compiler)
64-
* `module`: local, commonjs, or amd (local corresponds to not passing any compiler --module flag)
65-
* `fileName`: path
66-
* These tags delimit sections of a file to be used as separate compilation units. They are useful for tests relating to modules. See below for examples.
143+
These files support metadata tags in the format `// @metaDataName: value`.
144+
The supported names and values are the same as those supported in the compiler itself, with the addition of the `fileName` flag.
145+
`fileName` tags delimit sections of a file to be used as separate compilation units.
146+
They are useful for tests relating to modules.
147+
See below for examples.
67148

68149
**Note** that if you have a test corresponding to a specific spec compliance item, you can place it in `tests\cases\conformance` in an appropriately-named subfolder.
69150
**Note** that filenames here must be distinct from all other compiler testcase names, so you may have to work a bit to find a unique name if it's something common.
@@ -86,6 +167,7 @@ var x = g();
86167
One can also write a project test, but it is slightly more involved.
87168

88169
## Managing the Baselines
170+
89171
Compiler testcases generate baselines that track the emitted `.js`, the errors produced by the compiler, and the type of each expression in the file. Additionally, some testcases opt in to baselining the source map output.
90172

91173
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
@@ -102,4 +184,4 @@ jake baseline-accept
102184

103185
to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines.
104186

105-
**Note** that baseline-accept should only be run after a full test run! Accepting baselines after running a subset of tests will delete baseline files for the tests that didn't run.
187+
**Note** that `baseline-accept` should only be run after a full test run! Accepting baselines after running a subset of tests will delete baseline files for the tests that didn't run.

0 commit comments

Comments
 (0)