tsrc 2.1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +55 -0
  5. data/README.md +33 -0
  6. data/Rakefile +16 -0
  7. data/lib/tsrc.rb +57 -0
  8. data/lib/tsrc/support/typescript/.mailmap +216 -0
  9. data/lib/tsrc/support/typescript/.npmignore +19 -0
  10. data/lib/tsrc/support/typescript/AUTHORS.md +204 -0
  11. data/lib/tsrc/support/typescript/CONTRIBUTING.md +185 -0
  12. data/lib/tsrc/support/typescript/CopyrightNotice.txt +15 -0
  13. data/lib/tsrc/support/typescript/LICENSE.txt +55 -0
  14. data/lib/tsrc/support/typescript/README.md +98 -0
  15. data/lib/tsrc/support/typescript/ThirdPartyNoticeText.txt +35 -0
  16. data/lib/tsrc/support/typescript/bin/tsc +2 -0
  17. data/lib/tsrc/support/typescript/bin/tsserver +2 -0
  18. data/lib/tsrc/support/typescript/lib/README.md +5 -0
  19. data/lib/tsrc/support/typescript/lib/cancellationToken.js +41 -0
  20. data/lib/tsrc/support/typescript/lib/lib.d.ts +18215 -0
  21. data/lib/tsrc/support/typescript/lib/lib.dom.d.ts +13738 -0
  22. data/lib/tsrc/support/typescript/lib/lib.dom.iterable.d.ts +33 -0
  23. data/lib/tsrc/support/typescript/lib/lib.es2015.collection.d.ts +92 -0
  24. data/lib/tsrc/support/typescript/lib/lib.es2015.core.d.ts +544 -0
  25. data/lib/tsrc/support/typescript/lib/lib.es2015.d.ts +30 -0
  26. data/lib/tsrc/support/typescript/lib/lib.es2015.generator.d.ts +32 -0
  27. data/lib/tsrc/support/typescript/lib/lib.es2015.iterable.d.ts +465 -0
  28. data/lib/tsrc/support/typescript/lib/lib.es2015.promise.d.ts +274 -0
  29. data/lib/tsrc/support/typescript/lib/lib.es2015.proxy.d.ts +42 -0
  30. data/lib/tsrc/support/typescript/lib/lib.es2015.reflect.d.ts +35 -0
  31. data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.d.ts +56 -0
  32. data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.wellknown.d.ts +347 -0
  33. data/lib/tsrc/support/typescript/lib/lib.es2016.array.include.d.ts +118 -0
  34. data/lib/tsrc/support/typescript/lib/lib.es2016.d.ts +22 -0
  35. data/lib/tsrc/support/typescript/lib/lib.es2017.d.ts +24 -0
  36. data/lib/tsrc/support/typescript/lib/lib.es2017.object.d.ts +45 -0
  37. data/lib/tsrc/support/typescript/lib/lib.es2017.sharedmemory.d.ts +47 -0
  38. data/lib/tsrc/support/typescript/lib/lib.es2017.string.d.ts +47 -0
  39. data/lib/tsrc/support/typescript/lib/lib.es5.d.ts +4195 -0
  40. data/lib/tsrc/support/typescript/lib/lib.es6.d.ts +19950 -0
  41. data/lib/tsrc/support/typescript/lib/lib.scripthost.d.ts +311 -0
  42. data/lib/tsrc/support/typescript/lib/lib.webworker.d.ts +1274 -0
  43. data/lib/tsrc/support/typescript/lib/protocol.d.ts +1900 -0
  44. data/lib/tsrc/support/typescript/lib/tsc.js +52470 -0
  45. data/lib/tsrc/support/typescript/lib/tsserver.js +70720 -0
  46. data/lib/tsrc/support/typescript/lib/tsserverlibrary.d.ts +11939 -0
  47. data/lib/tsrc/support/typescript/lib/tsserverlibrary.js +70256 -0
  48. data/lib/tsrc/support/typescript/lib/typescript.d.ts +3166 -0
  49. data/lib/tsrc/support/typescript/lib/typescript.js +81536 -0
  50. data/lib/tsrc/support/typescript/lib/typescriptServices.d.ts +3164 -0
  51. data/lib/tsrc/support/typescript/lib/typescriptServices.js +81536 -0
  52. data/lib/tsrc/support/typescript/lib/typingsInstaller.js +7314 -0
  53. data/lib/tsrc/support/typescript/package.json +129 -0
  54. data/lib/tsrc/support/typescript/test.config +1 -0
  55. data/lib/tsrc/version.rb +5 -0
  56. data/tsrc.gemspec +20 -0
  57. metadata +113 -0
@@ -0,0 +1,185 @@
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
+
43
+ ## Contributing bug fixes
44
+
45
+ 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.
46
+
47
+ ## Contributing features
48
+
49
+ 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.
50
+
51
+ Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
52
+
53
+ ## Legal
54
+
55
+ 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.
56
+
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.
58
+
59
+ ## Housekeeping
60
+
61
+ Your pull request should:
62
+
63
+ * Include a description of what your change intends to do
64
+ * Be a child commit of a reasonably recent commit in the **master** branch
65
+ * Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
66
+ * It is desirable, but not necessary, for the tests to pass at each commit
67
+ * Have clear commit messages
68
+ * e.g. "Refactor feature", "Fix issue", "Add tests for issue"
69
+ * Include adequate tests
70
+ * 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
71
+ * Tests should include reasonable permutations of the target fix/change
72
+ * Include baseline changes with your change
73
+ * All changed code must have 100% code coverage
74
+ * Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
75
+ * To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
76
+
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
+
92
+ ## Running the Tests
93
+
94
+ To run all tests, invoke the `runtests-parallel` target using jake:
95
+
96
+ ```Shell
97
+ jake runtests-parallel
98
+ ```
99
+
100
+ This run will all tests; to run only a specific subset of tests, use:
101
+
102
+ ```Shell
103
+ jake runtests tests=<regex>
104
+ ```
105
+
106
+ e.g. to run all compiler baseline tests:
107
+
108
+ ```Shell
109
+ jake runtests tests=compiler
110
+ ```
111
+
112
+ or to run a specific test: `tests\cases\compiler\2dArrays.ts`
113
+
114
+ ```Shell
115
+ jake runtests tests=2dArrays
116
+ ```
117
+
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
+
139
+ ## Adding a Test
140
+
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.
142
+
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.
148
+
149
+ **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.
150
+ **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.
151
+
152
+ ### Tests for multiple files
153
+
154
+ When one needs to test for scenarios which require multiple files, it is useful to use the `fileName` metadata tag as such:
155
+
156
+ ```TypeScript
157
+ // @fileName: file1.ts
158
+ export function f() {
159
+ }
160
+
161
+ // @fileName: file2.ts
162
+ import { f as g } from "file1";
163
+
164
+ var x = g();
165
+ ```
166
+
167
+ One can also write a project test, but it is slightly more involved.
168
+
169
+ ## Managing the Baselines
170
+
171
+ 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.
172
+
173
+ When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
174
+
175
+ ```Shell
176
+ jake diff
177
+ ```
178
+
179
+ After verifying that the changes in the baselines are correct, run
180
+
181
+ ```Shell
182
+ jake baseline-accept
183
+ ```
184
+
185
+ 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.
@@ -0,0 +1,15 @@
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
+
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,98 @@
1
+ [![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
2
+ [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
3
+ [![Downloads](https://img.shields.io/npm/dm/TypeScript.svg)](https://www.npmjs.com/package/typescript)
4
+
5
+ # TypeScript
6
+
7
+ [![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8
+
9
+ [TypeScript](http://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](http://www.typescriptlang.org/Playground), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang).
10
+
11
+ ## Installing
12
+
13
+ For the latest stable version:
14
+
15
+ ```
16
+ npm install -g typescript
17
+ ```
18
+
19
+ For our nightly builds:
20
+
21
+ ```
22
+ npm install -g typescript@next
23
+ ```
24
+
25
+ ## Contribute
26
+
27
+ There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
28
+ * [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
29
+ * Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
30
+ * Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
31
+ * Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
32
+ * [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
33
+ * Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
34
+ [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
35
+
36
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
37
+ the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
38
+ with any additional questions or comments.
39
+
40
+ ## Documentation
41
+
42
+ * [Quick tutorial](http://www.typescriptlang.org/Tutorial)
43
+ * [Programming handbook](http://www.typescriptlang.org/Handbook)
44
+ * [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
45
+ * [Homepage](http://www.typescriptlang.org/)
46
+
47
+ ## Building
48
+
49
+ In order to build the TypeScript compiler, ensure that you have [Git](http://git-scm.com/downloads) and [Node.js](http://nodejs.org/) installed.
50
+
51
+ Clone a copy of the repo:
52
+
53
+ ```
54
+ git clone https://github.com/Microsoft/TypeScript.git
55
+ ```
56
+
57
+ Change to the TypeScript directory:
58
+
59
+ ```
60
+ cd TypeScript
61
+ ```
62
+
63
+ Install Gulp tools and dev dependencies:
64
+
65
+ ```
66
+ npm install -g gulp
67
+ npm install
68
+ ```
69
+
70
+ Use one of the following to build and test:
71
+
72
+ ```
73
+ gulp local # Build the compiler into built/local
74
+ gulp clean # Delete the built compiler
75
+ gulp LKG # Replace the last known good with the built one.
76
+ # Bootstrapping step to be executed when the built compiler reaches a stable state.
77
+ gulp tests # Build the test infrastructure using the built compiler.
78
+ gulp runtests # Run tests using the built compiler and test infrastructure.
79
+ # You can override the host or specify a test for this command.
80
+ # Use host=<hostName> or tests=<testPath>.
81
+ gulp runtests-browser # Runs the tests using the built run.js file. Syntax is gulp runtests. Optional
82
+ parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
83
+ gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests.
84
+ gulp lint # Runs tslint on the TypeScript source.
85
+ gulp help # List the above commands.
86
+ ```
87
+
88
+
89
+ ## Usage
90
+
91
+ ```shell
92
+ node built/local/tsc.js hello.ts
93
+ ```
94
+
95
+
96
+ ## Roadmap
97
+
98
+ For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
@@ -0,0 +1,35 @@
1
+ /*!----------------- TypeScript ThirdPartyNotices -------------------------------------------------------
2
+
3
+ The TypeScript software is based on or incorporates material and code from the projects listed below
4
+ (collectively "Third Party Code"). Microsoft is not the original author of the
5
+ Third Party Code. The original copyright notice and the license, under which
6
+ Microsoft received such Third Party Code, are set forth below. Such license and
7
+ notices are provided for informational purposes only. Microsoft licenses the Third
8
+ Party Code to you under the terms of the Apache 2.0 License.
9
+ All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you
10
+ may not use this file except in compliance with the License. You may obtain a copy
11
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14
+ EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
15
+ CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
16
+
17
+ See the Apache Version 2.0 License for specific language governing permissions and
18
+ limitations under the License.
19
+ ---------------------------------------------
20
+ Third Party Code Components
21
+ --------------------------------------------
22
+
23
+ ------------------- DefinitelyTyped --------------------
24
+ 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.
25
+ DefinitelyTyped
26
+ This project is licensed under the MIT license.
27
+ Copyrights are respective of each contributor listed at the beginning of each definition file.
28
+ Provided for Informational Purposes Only
29
+
30
+ MIT License
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
32
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
+ --------------------------------------------------------------------------------------
35
+ ------------- End of ThirdPartyNotices --------------------------------------------------- */
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../lib/tsc.js')
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../lib/tsserver.js')
@@ -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.
@@ -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;