You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ Your pull request should:
72
72
* Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
73
73
* It is desirable, but not necessary, for the tests to pass at each commit
74
74
* Have clear commit messages
75
-
* e.g. "Refactor feature", "Fix issue", "Add tests for issue"
75
+
* e.g. "Minor refactor in goToTypeDefinition", "Fix iterated type in for-await-of", "Add test for preserveWatchOutput on command line"
76
76
* Include adequate tests
77
77
* At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why
78
78
* Tests should include reasonable permutations of the target fix/change
@@ -82,19 +82,26 @@ Your pull request should:
82
82
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
83
83
84
84
## Contributing `lib.d.ts` fixes
85
-
86
-
The library sources are in: [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib)
87
85
88
-
Library files in `built/local/` are updated by running
89
-
```Shell
86
+
There are three relevant locations to be aware of when it comes to TypeScript's library declaration files:
87
+
88
+
*`src/lib`: the location of the sources themselves.
89
+
*`lib`: the location of the last-known-good (LKG) versions of the files which are updated periodically.
90
+
*`built/local`: the build output location, including where `src/lib` files will be copied to.
91
+
92
+
Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/tree/master/src/lib). **Most** of these files can be updated by hand, with the exception of any generated files (see below).
93
+
94
+
Library files in `built/local/` are updated automatically by running the standard build task:
95
+
96
+
```sh
90
97
jake
91
98
```
92
99
93
-
The files in `lib/` are used to bootstrap compilation and usually do not need to be updated.
100
+
The files in `lib/` are used to bootstrap compilation and usually **should not**be updated unless publishing a new version or updating the LKG.
94
101
95
-
#### `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts`
102
+
###Modifying generated library files
96
103
97
-
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
104
+
The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` both represent type declarations for the DOM and are auto-generated. To make any modifications to them, you will have to direct changes tohttps://github.com/Microsoft/TSJS-lib-generator
98
105
99
106
## Running the Tests
100
107
@@ -104,7 +111,7 @@ To run all tests, invoke the `runtests-parallel` target using jake:
104
111
jake runtests-parallel
105
112
```
106
113
107
-
This run will all tests; to run only a specific subset of tests, use:
114
+
This will run all tests; to run only a specific subset of tests, use:
108
115
109
116
```Shell
110
117
jake runtests tests=<regex>
@@ -137,10 +144,10 @@ You can specify which browser to use for debugging. Currently Chrome and IE are
You can debug with VS Code or Node instead with `jake runtests debug=true`:
147
+
You can debug with VS Code or Node instead with `jake runtests inspect=true`:
141
148
142
149
```Shell
143
-
jake runtests tests=2dArrays debug=true
150
+
jake runtests tests=2dArrays inspect=true
144
151
```
145
152
146
153
## Adding a Test
@@ -153,7 +160,7 @@ The supported names and values are the same as those supported in the compiler i
153
160
They are useful for tests relating to modules.
154
161
See below for examples.
155
162
156
-
**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.
163
+
**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.
157
164
**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.
158
165
159
166
### Tests for multiple files
@@ -194,6 +201,6 @@ to establish the new baselines as the desired behavior. This will change the fil
194
201
## Localization
195
202
196
203
All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
197
-
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in [`diagnosticInformationMap.generated.ts`](./src/compiler/diagnosticInformationMap.generated.ts).
204
+
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`.
198
205
199
206
See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
[](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
9
10
-
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang).
10
+
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional typesto JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang).
11
11
12
12
## Installing
13
13
@@ -29,7 +29,7 @@ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob
29
29
*[Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
30
30
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
31
31
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
32
-
* Join the [#typescript](https://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
32
+
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
0 commit comments