Skip to content

Commit 5943f04

Browse files
committed
Merge branch 'master' into alternateFixSuperInAsyncMethod
2 parents 67a4fe5 + efc573f commit 5943f04

File tree

5,696 files changed

+198983
-50842
lines changed

Some content is hidden

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

5,696 files changed

+198983
-50842
lines changed

CONTRIBUTING.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
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 [http://stackoverflow.com/questions/tagged/typescript](Stack Overflow), [https://gitter.im/Microsoft/TypeScript](Gitter), 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 suggestins 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
244

345
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.
@@ -36,11 +78,13 @@ Your pull request should:
3678

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

39-
To build the library files, run
81+
Library files in `built/local/` are updated by running
4082
```Shell
41-
jake lib
83+
jake
4284
```
4385

86+
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
87+
4488
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
4589

4690
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: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,6 @@ var serverCoreSources = [
108108
return path.join(serverDirectory, f);
109109
});
110110

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

123113
var languageServiceLibrarySources = [
@@ -173,13 +163,13 @@ var harnessSources = harnessCoreSources.concat([
173163
}));
174164

175165
var librarySourceMap = [
176-
{ target: "lib.core.d.ts", sources: ["core.d.ts"] },
166+
{ target: "lib.core.d.ts", sources: ["header.d.ts", "core.d.ts"] },
177167
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "dom.generated.d.ts"], },
178168
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "webworker.generated.d.ts"], },
179169
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
180-
{ target: "lib.d.ts", sources: ["core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
181-
{ target: "lib.core.es6.d.ts", sources: ["core.d.ts", "es6.d.ts"]},
182-
{ target: "lib.es6.d.ts", sources: ["es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
170+
{ target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
171+
{ target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"]},
172+
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
183173
];
184174

185175
var libraryTargets = librarySourceMap.map(function (f) {
@@ -543,7 +533,8 @@ compileFile(word2mdJs,
543533
// The generated spec.md; built for the 'generate-spec' task
544534
file(specMd, [word2mdJs, specWord], function () {
545535
var specWordFullPath = path.resolve(specWord);
546-
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + specMd;
536+
var specMDFullPath = path.resolve(specMd);
537+
var cmd = "cscript //nologo " + word2mdJs + ' "' + specWordFullPath + '" ' + '"' + specMDFullPath + '"';
547538
console.log(cmd);
548539
child_process.exec(cmd, function () {
549540
complete();
@@ -875,7 +866,9 @@ var tslintRules = ([
875866
"noNullRule",
876867
"preferConstRule",
877868
"booleanTriviaRule",
878-
"typeOperatorSpacingRule"
869+
"typeOperatorSpacingRule",
870+
"noInOperatorRule",
871+
"noIncrementDecrementRule"
879872
]);
880873
var tslintRulesFiles = tslintRules.map(function(p) {
881874
return path.join(tslintRuleDir, p + ".ts");
@@ -900,6 +893,7 @@ function getLinterOptions() {
900893

901894
function lintFileContents(options, path, contents) {
902895
var ll = new Linter(path, contents, options);
896+
console.log("Linting '" + path + "'.")
903897
return ll.lint();
904898
}
905899

@@ -918,21 +912,35 @@ function lintFileAsync(options, path, cb) {
918912
});
919913
}
920914

915+
var servicesLintTargets = [
916+
"navigateTo.ts",
917+
"outliningElementsCollector.ts",
918+
"patternMatcher.ts",
919+
"services.ts",
920+
"shims.ts",
921+
].map(function (s) {
922+
return path.join(servicesDirectory, s);
923+
});
921924
var lintTargets = compilerSources
922925
.concat(harnessCoreSources)
923926
.concat(serverCoreSources)
924-
.concat(scriptSources);
927+
.concat(tslintRulesFiles)
928+
.concat(servicesLintTargets);
925929

926930
desc("Runs tslint on the compiler sources");
927931
task("lint", ["build-rules"], function() {
928932
var lintOptions = getLinterOptions();
933+
var failed = 0;
929934
for (var i in lintTargets) {
930935
var result = lintFile(lintOptions, lintTargets[i]);
931936
if (result.failureCount > 0) {
932937
console.log(result.output);
933-
fail('Linter errors.', result.failureCount);
938+
failed += result.failureCount;
934939
}
935940
}
941+
if (failed > 0) {
942+
fail('Linter errors.', failed);
943+
}
936944
});
937945

938946
/**

doc/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This directory contains miscellaneous documentation such as the TypeScript language specification and logo.
2+
If you are looking for more introductory material, you might want to take a look at the [TypeScript Handbook](https://github.com/Microsoft/TypeScript-Handbook).
3+
4+
# Spec Contributions
5+
6+
The specification is first authored as a Microsoft Word (docx) file and then generated into Markdown and PDF formats.
7+
Due to the binary format of docx files, and the merging difficulties that may come with it, it is preferred that any suggestions or problems found in the spec should be [filed as issues](https://github.com/Microsoft/TypeScript/issues/new) rather than sent as pull requests.
15.9 KB
Binary file not shown.
69.3 KB
Binary file not shown.
6.05 KB
Binary file not shown.
58 KB
Binary file not shown.

doc/images/image1.png

11.4 KB
Loading

doc/images/image2.png

10 KB
Loading

doc/images/image3.png

5.86 KB
Loading

0 commit comments

Comments
 (0)