Skip to content

Commit 3f56411

Browse files
Merge branch 'master' into getOccurrencesThrow
2 parents 16d969c + e8c3ec3 commit 3f56411

File tree

190 files changed

+21799
-8755
lines changed

Some content is hidden

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

190 files changed

+21799
-8755
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ tests/*.d.ts
3636
*.config
3737
scripts/debug.bat
3838
scripts/run.bat
39+
scripts/word2md.js
3940
coverage/

Jakefile

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
var fs = require("fs");
44
var path = require("path");
5+
var child_process = require("child_process");
56

67
// Variables
78
var compilerDirectory = "src/compiler/";
89
var servicesDirectory = "src/services/";
910
var harnessDirectory = "src/harness/";
1011
var libraryDirectory = "src/lib/";
1112
var scriptsDirectory = "scripts/";
13+
var docDirectory = "doc/";
1214

1315
var builtDirectory = "built/";
1416
var builtLocalDirectory = "built/local/";
@@ -54,6 +56,8 @@ var servicesSources = [
5456
}).concat([
5557
"services.ts",
5658
"shims.ts",
59+
"signatureHelp.ts",
60+
"utilities.ts"
5761
].map(function (f) {
5862
return path.join(servicesDirectory, f);
5963
}));
@@ -63,7 +67,6 @@ var harnessSources = [
6367
"sourceMapRecorder.ts",
6468
"harnessLanguageService.ts",
6569
"fourslash.ts",
66-
"external/json2.ts",
6770
"runnerbase.ts",
6871
"compilerRunner.ts",
6972
"typeWriter.ts",
@@ -259,6 +262,38 @@ task("clean", function() {
259262
jake.rmRf(builtDirectory);
260263
});
261264

265+
// Generate Markdown spec
266+
var word2mdJs = path.join(scriptsDirectory, "word2md.js");
267+
var word2mdTs = path.join(scriptsDirectory, "word2md.ts");
268+
var specWord = path.join(docDirectory, "TypeScript Language Specification.docx");
269+
var specMd = path.join(docDirectory, "spec.md");
270+
var headerMd = path.join(docDirectory, "header.md");
271+
272+
file(word2mdTs);
273+
274+
// word2md script
275+
compileFile(word2mdJs,
276+
[word2mdTs],
277+
[word2mdTs],
278+
[],
279+
false);
280+
281+
// The generated spec.md; built for the 'generate-spec' task
282+
file(specMd, [word2mdJs, specWord], function () {
283+
jake.cpR(headerMd, specMd, {silent: true});
284+
var specWordFullPath = path.resolve(specWord);
285+
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" >>' + specMd;
286+
console.log(cmd);
287+
child_process.exec(cmd, function () {
288+
complete();
289+
});
290+
}, {async: true})
291+
292+
293+
desc("Generates a Markdown version of the Language Specification");
294+
task("generate-spec", [specMd])
295+
296+
262297
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
263298
desc("Makes a new LKG out of the built js files");
264299
task("LKG", libraryTargets, function() {
@@ -318,7 +353,7 @@ function exec(cmd, completeHandler) {
318353
complete();
319354
})
320355
try{
321-
ex.run();
356+
ex.run();
322357
} catch(e) {
323358
console.log('Exception: ' + e)
324359
}
@@ -342,7 +377,7 @@ function cleanTestDirs() {
342377
function writeTestConfigFile(tests, testConfigFile) {
343378
console.log('Running test(s): ' + tests);
344379
var testConfigContents = '{\n' + '\ttest: [\'' + tests + '\']\n}';
345-
fs.writeFileSync('test.config', testConfigContents);
380+
fs.writeFileSync('test.config', testConfigContents);
346381
}
347382

348383
function deleteTemporaryProjectOutput() {
@@ -385,7 +420,7 @@ desc("Generates code coverage data via instanbul")
385420
task("generate-code-coverage", ["tests", builtLocalDirectory], function () {
386421
var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run;
387422
console.log(cmd);
388-
exec(cmd);
423+
exec(cmd);
389424
}, { async: true });
390425

391426
// Browser tests

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
1818

1919
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
2020
* [Programming handbook](http://www.typescriptlang.org/Handbook)
21-
* [Language specification](http://go.microsoft.com/fwlink/?LinkId=267238)
21+
* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
2222
* [Homepage](http://www.typescriptlang.org/)
2323

2424
## Building
@@ -47,16 +47,18 @@ npm install
4747
Use one of the following to build and test:
4848

4949
```
50-
jake local # Build the compiler into built/local
51-
jake clean # Delete the built compiler
52-
jake LKG # Replace the last known good with the built one.
53-
# Bootstrapping step to be executed when the built compiler reaches a stable state.
54-
jake tests # Build the test infrastructure using the built compiler.
55-
jake runtests # Run tests using the built compiler and test infrastructure.
56-
# You can override the host or specify a test for this command.
57-
# Use host=<hostName> or tests=<testPath>.
58-
jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests.
59-
jake -T # List the above commands.
50+
jake local # Build the compiler into built/local
51+
jake clean # Delete the built compiler
52+
jake LKG # Replace the last known good with the built one.
53+
# Bootstrapping step to be executed when the built compiler reaches a stable state.
54+
jake tests # Build the test infrastructure using the built compiler.
55+
jake runtests # Run tests using the built compiler and test infrastructure.
56+
# You can override the host or specify a test for this command.
57+
# Use host=<hostName> or tests=<testPath>.
58+
jake runtests-browser # Runs the tests using the built run.js file. Syntax is jake runtests. Optional
59+
parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
60+
jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests.
61+
jake -T # List the above commands.
6062
```
6163

6264

ThirdPartyNoticeText.txt

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -19,67 +19,6 @@ limitations under the License.
1919
---------------------------------------------
2020
Third Party Code Components
2121
--------------------------------------------
22-
---- Mozilla Developer Code---------
23-
The following Mozilla Developer Code is under Public Domain as updated after Aug. 20, 2012, see, https://developer.mozilla.org/en-US/docs/Project:Copyrights
24-
1. Array filter Compatibility Method,
25-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter
26-
Any copyright is dedicated to the Public Domain.
27-
28-
2. Array forEach Compatibility Method,
29-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach
30-
Any copyright is dedicated to the Public Domain.
31-
32-
3. Array indexOf Compatibility Method,
33-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf
34-
Any copyright is dedicated to the Public Domain.
35-
36-
4. Array map Compatibility Method,
37-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map
38-
Any copyright is dedicated to the Public Domain.
39-
40-
5. Array Reduce Compatibility Method,
41-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/Reduce
42-
Any copyright is dedicated to the Public Domain.
43-
44-
6. String Trim Compatibility Method,
45-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim
46-
Any copyright is dedicated to the Public Domain.
47-
48-
7. Date now Compatibility Method,
49-
Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now
50-
Any copyright is dedicated to the Public Domain.
51-
52-
------------JSON2 Script------------------------
53-
json2.js 2012-10-08
54-
Public Domain.
55-
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
56-
See, http://www.JSON.org/js.html
57-
58-
--------------r.js----------------------
59-
Copyright (c) 2010-2011 Dojo Foundation. All Rights Reserved.
60-
Originally License under MIT License
61-
-------------------------------------------------------------------------
62-
Provided for Informational Purposes Only
63-
MIT License
64-
65-
Permission is hereby granted, free of charge, to any person obtaining
66-
a copy of this software and associated documentation files (the
67-
"Software"), to deal in the Software without restriction, including
68-
without limitation the rights to use, copy, modify, merge, publish,
69-
distribute, sublicense, and/or sell copies of the Software, and to
70-
permit persons to whom the Software is furnished to do so, subject to
71-
the following conditions:
72-
73-
The above copyright notice and this permission notice shall be
74-
included in all copies or substantial portions of the Software.
75-
76-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
77-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
79-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
80-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
81-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
82-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8322

8423
------------------- DefinitelyTyped --------------------
8524
This file is based on or incorporates material from the projects listed below (collectively ?Third Party Code?). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.

bin/lib.d.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,14 +1182,14 @@ interface Int8Array extends ArrayBufferView {
11821182

11831183
/**
11841184
* Sets a value or an array of values.
1185-
* @param A typed or untyped array of values to set.
1185+
* @param array A typed or untyped array of values to set.
11861186
* @param offset The index in the current array at which the values are to be written.
11871187
*/
11881188
set(array: Int8Array, offset?: number): void;
11891189

11901190
/**
11911191
* Sets a value or an array of values.
1192-
* @param A typed or untyped array of values to set.
1192+
* @param array A typed or untyped array of values to set.
11931193
* @param offset The index in the current array at which the values are to be written.
11941194
*/
11951195
set(array: number[], offset?: number): void;
@@ -1240,14 +1240,14 @@ interface Uint8Array extends ArrayBufferView {
12401240

12411241
/**
12421242
* Sets a value or an array of values.
1243-
* @param A typed or untyped array of values to set.
1243+
* @param array A typed or untyped array of values to set.
12441244
* @param offset The index in the current array at which the values are to be written.
12451245
*/
12461246
set(array: Uint8Array, offset?: number): void;
12471247

12481248
/**
12491249
* Sets a value or an array of values.
1250-
* @param A typed or untyped array of values to set.
1250+
* @param array A typed or untyped array of values to set.
12511251
* @param offset The index in the current array at which the values are to be written.
12521252
*/
12531253
set(array: number[], offset?: number): void;
@@ -1298,14 +1298,14 @@ interface Int16Array extends ArrayBufferView {
12981298

12991299
/**
13001300
* Sets a value or an array of values.
1301-
* @param A typed or untyped array of values to set.
1301+
* @param array A typed or untyped array of values to set.
13021302
* @param offset The index in the current array at which the values are to be written.
13031303
*/
13041304
set(array: Int16Array, offset?: number): void;
13051305

13061306
/**
13071307
* Sets a value or an array of values.
1308-
* @param A typed or untyped array of values to set.
1308+
* @param array A typed or untyped array of values to set.
13091309
* @param offset The index in the current array at which the values are to be written.
13101310
*/
13111311
set(array: number[], offset?: number): void;
@@ -1356,14 +1356,14 @@ interface Uint16Array extends ArrayBufferView {
13561356

13571357
/**
13581358
* Sets a value or an array of values.
1359-
* @param A typed or untyped array of values to set.
1359+
* @param array A typed or untyped array of values to set.
13601360
* @param offset The index in the current array at which the values are to be written.
13611361
*/
13621362
set(array: Uint16Array, offset?: number): void;
13631363

13641364
/**
13651365
* Sets a value or an array of values.
1366-
* @param A typed or untyped array of values to set.
1366+
* @param array A typed or untyped array of values to set.
13671367
* @param offset The index in the current array at which the values are to be written.
13681368
*/
13691369
set(array: number[], offset?: number): void;
@@ -1414,14 +1414,14 @@ interface Int32Array extends ArrayBufferView {
14141414

14151415
/**
14161416
* Sets a value or an array of values.
1417-
* @param A typed or untyped array of values to set.
1417+
* @param array A typed or untyped array of values to set.
14181418
* @param offset The index in the current array at which the values are to be written.
14191419
*/
14201420
set(array: Int32Array, offset?: number): void;
14211421

14221422
/**
14231423
* Sets a value or an array of values.
1424-
* @param A typed or untyped array of values to set.
1424+
* @param array A typed or untyped array of values to set.
14251425
* @param offset The index in the current array at which the values are to be written.
14261426
*/
14271427
set(array: number[], offset?: number): void;
@@ -1472,14 +1472,14 @@ interface Uint32Array extends ArrayBufferView {
14721472

14731473
/**
14741474
* Sets a value or an array of values.
1475-
* @param A typed or untyped array of values to set.
1475+
* @param array A typed or untyped array of values to set.
14761476
* @param offset The index in the current array at which the values are to be written.
14771477
*/
14781478
set(array: Uint32Array, offset?: number): void;
14791479

14801480
/**
14811481
* Sets a value or an array of values.
1482-
* @param A typed or untyped array of values to set.
1482+
* @param array A typed or untyped array of values to set.
14831483
* @param offset The index in the current array at which the values are to be written.
14841484
*/
14851485
set(array: number[], offset?: number): void;
@@ -1530,14 +1530,14 @@ interface Float32Array extends ArrayBufferView {
15301530

15311531
/**
15321532
* Sets a value or an array of values.
1533-
* @param A typed or untyped array of values to set.
1533+
* @param array A typed or untyped array of values to set.
15341534
* @param offset The index in the current array at which the values are to be written.
15351535
*/
15361536
set(array: Float32Array, offset?: number): void;
15371537

15381538
/**
15391539
* Sets a value or an array of values.
1540-
* @param A typed or untyped array of values to set.
1540+
* @param array A typed or untyped array of values to set.
15411541
* @param offset The index in the current array at which the values are to be written.
15421542
*/
15431543
set(array: number[], offset?: number): void;
@@ -1588,14 +1588,14 @@ interface Float64Array extends ArrayBufferView {
15881588

15891589
/**
15901590
* Sets a value or an array of values.
1591-
* @param A typed or untyped array of values to set.
1591+
* @param array A typed or untyped array of values to set.
15921592
* @param offset The index in the current array at which the values are to be written.
15931593
*/
15941594
set(array: Float64Array, offset?: number): void;
15951595

15961596
/**
15971597
* Sets a value or an array of values.
1598-
* @param A typed or untyped array of values to set.
1598+
* @param array A typed or untyped array of values to set.
15991599
* @param offset The index in the current array at which the values are to be written.
16001600
*/
16011601
set(array: number[], offset?: number): void;

0 commit comments

Comments
 (0)