Skip to content

Commit 918289c

Browse files
authored
Merge pull request #569 from Microsoft/updateLibAndGrammar
Update lib and grammar for TypeScript 2.1
2 parents f625967 + 7a8a78b commit 918289c

38 files changed

+380811
-95214
lines changed

TypeScript.tmLanguage

Lines changed: 819 additions & 255 deletions
Large diffs are not rendered by default.

TypeScriptReact.tmLanguage

Lines changed: 828 additions & 297 deletions
Large diffs are not rendered by default.

tsserver/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

tsserver/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Read This!
2+
3+
**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.
5+
Running `jake LKG` will then appropriately update the files in this directory.

tsserver/cancellationToken.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
"use strict";
17+
var fs = require("fs");
18+
function createCancellationToken(args) {
19+
var cancellationPipeName;
20+
for (var i = 0; i < args.length - 1; i++) {
21+
if (args[i] === "--cancellationPipeName") {
22+
cancellationPipeName = args[i + 1];
23+
break;
24+
}
25+
}
26+
if (!cancellationPipeName) {
27+
return { isCancellationRequested: function () { return false; } };
28+
}
29+
return {
30+
isCancellationRequested: function () {
31+
try {
32+
fs.statSync(cancellationPipeName);
33+
return true;
34+
}
35+
catch (e) {
36+
return false;
37+
}
38+
}
39+
};
40+
}
41+
module.exports = createCancellationToken;

0 commit comments

Comments
 (0)