Skip to content

Commit c921687

Browse files
authored
PR (#1)
* Factor out getRenameInfo * Update Jakefile * Correct emit comment for decorated class declaration * Add tests and baselines * Allow -Infinity as an enum property name * Move allocators.ts to services.ts, meaning.ts to utilities.ts, and transpile functions to a new file transpile.ts * Correct strings based on linting rules * Force source-map-support to not have source maps It fooled sorcery's incorrect check for sourceMappingURL into thinking it had a source map. Also up the error stack trace limit to 1000 to help future error reporting. * Only emit comment only once in module declaration with identifier path name * Only emit comment once for export enum declaration * When emitting react code, replace HTML numeric entities with their encoded characters * Also decode entities when emitting attributes. Also, lexer should not process string escapes in jsx attributes. * Use undefined, not null, to satisfy linter * Update preferConstRule to use getCombined*X*Flags now that they are exported. * Remove another unused function in preferConstRule * Yep, another unused function in preferConstRule * Revert "Remove failing fourslash tests (may need to be restored and fixed)" This reverts commit 2a60f79. * Revert "Remove failing fourslash tests (may need to be restored and fixed)" This reverts commit 2f9c9c9. * Number is assignable to enum, even inside union Previously, numbers were not assignable to enums that were inside a union * Test that number is assignable to enum in a union * Use baselines for quick info tests to ease updates * Fix duplicate baselines * Use shorthand properties * A shorthand ambient module should be considered as possibly exporting a value. * Enum literal is assignable to enum, even inside union Previously, only number literals were assignable to enums inside unions. * Test that enum literal is assignable to an enum in a union * Fix tests * Accept baselines after merge * Fix fourslash test * Make preProcessFile public again * Fix both new enum assignability predicates And update error reporting baseline (new error is less elaborate) * Fix classifier as well. * Fix deferred export of array binding pattern * Move code to a new module documentRegistry.ts * Handle `OmittedExpression` nodes in binding patterns * Surfacing method to get Completion Symbol instead of details for better extensibility * Surfacing function in services.ts * Assume outer variables are always initialized in control flow analysis * Add regression tests * Don't try to unlink folders * Fix line endings * Fix {Map,WeakMap}.prototype.set method signatures (microsoft#10694) * Document `endOfChain` * Adding method stub for the LanguageServiceShimProxy implementation * method stub throwing an error for SessionClient * lint: remove trailing whitespace in completions.ts * Simplify parameters of `quickInfoIs`: `expectedtext` must be present and `expectedDocumentation` must be a string or ommitted, never null. * minor changes from PR feedback * Code cleanup and a few edge cases * Disallow comma operator when LHS is pure * Prevent duplicate entries from type references * Added a STRATEGY placeholder for the --moduleResolution option * Preserve type parameter types in narrowing * Add regression test * Fix ECMA-402 declarations (issue microsoft#10618) 1. Make String.prototype.localeCompare's `locales` parameter optional, so `undefined` is allowed. 2. Declare the `locales` parameter as a `string | string[]` union instead of using overloads. Having separate overloads for `string` and `string[]` unnecessarily prevents passing a `string | string[]`. (These overloads predate the introduction of union types.) * Accept new baselines * Handle const binding elements with initializers correctly * Add tests * Update tests * Address PR comments 1. Cache results of isEnumTypeRelatedTo 2. Make numeric literal assignment stricter again. 3. Use isEnumRelatedTo for comparing enums to each other. This provides the previous semi-structural semantics. 4. Because of the new distinction between computed enums (no union members) and union enums (no computed values => a union of enum literals), some semi-structural code moves out to the body of `isRelatedTo`. * More tests of enum assignability 1. Numeric literal <-> enum literal assignability 2. Computed enum <-> union enum assignability 3. Also rebaseline error reporting of existing enum cases. * Fix lint * Update baselines * PR feedback * Fix issue with helper emit. Fixes microsoft#10800 * Quick bail out when narrowing type any by equality * Add regression test * Support export default for target=ES5/module=ES6. Fixes microsoft#10855 * Update failing test baseline * Enum assignability:loosen numbers+tighten computed 1. All numbers and numeric literals are assignable to all enums and enum literals. 2. Computed enums are no longer assignable to anything except themselves, even if they would otherwise be "semi-structurally" compatible. * Update baselines for updated enum assignability * Fix missing asteriskToken for target=es6/module=amd. Fixes microsoft#10857. * Computed enum assignability is semi-structural * Update baselines * Disallow left comma operator operands which don't have side effects * No widening of inferred type when initializer has a type assertion * Accept new baselines * Add test * Fix missing final label. Fixes microsoft#10876 * Implement NavigateTo for single files, instead of the project. * Get rid of BOM * Consume exceptions when checking for import completions * Also wrap getEffectiveTypeRoots in import completion code * Added test for scenario. * Fix captured block scope variables in downlevel async. Fixes microsoft#10889 * Remove unnecessary parentheses * PR feedback and clean up. * Add stackTraceLimit; update harness/tsconfig.json 1. Add stackTraceLimit argument to runtests. 2. Copy missing compiler files from compiler/tsconfig.json to harness/tsconfig.json * Simplify quick-info tests * Flip check, add SEF cases * Baseline update * Add JSX to SEF exprs * Fix build tasks for iocapture * Added comments for __generator, reduced overall size of helper * Add Code of Conduct * Removed Code of Conduct from contributing, since readme is more obvious * Fix build error caused by merge * move to contribute header * More PR feedback * Use diffrent error message for namespaces unexported members * Update other defintions of findIndex * Rename function and use `directorySeparator` variables * Remove duplicate test * Lint * Fix issue 10843 * add test for issue 10843 * Match number and string literal types to number and string in inference * Add readonly typings for Set and Map Similar to ReadonlyArray, these typings remove the mutation methods from Set and Map so that they can only be initialized by the constructor. * Accept new baselines * Add regression test * Fix test issues due to an out of order merge * Fix super in down-level async method * add release-2.0 * More PR feedback * Address CR feedback * Allow type and NS references to UMD globals from modules Fixes microsoft#10638 * Add comment explaining a magic constant in parser * Fixing formatting * revert tests * revert fix for generated files * update findIndex for es5 typed arrays * Make declaration emit test name consistent * Update baselines * Removed constructor typings which can't be used Also corrected some parameter names. * indenting * Add tests * Serialize type alias when type alias symbol is not accessible * Update baselines * Address PR * Fix build break: difference result from treating things as literal type * Address PR: Update comment * change error message for assigning from object * Fix Reflect has method signature(s) per issue microsoft#10949 initial report * fix linting error * Output the help message line by line. * Pass the jake test * Handle msising tags for JsDoc nodes * Add back getSourceFile and mark it as deprecated * Use TypeFlags.Never to check for 'never' type * Use silent never type in control flow loop analysis * Add regression test * Accept new baselines * Take a few changes. * fix typo * remove extra files * Correctly remove stale .error.txt baselines * Fix downlevel async hoisting * Fix some issues with module ES6/target ES5 * Fix missing visit of expression in for..of
1 parent 0d5653e commit c921687

File tree

19,614 files changed

+1023198
-407106
lines changed

Some content is hidden

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

19,614 files changed

+1023198
-407106
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.js linguist-language=TypeScript
1+
*.js linguist-language=TypeScript
2+
* -text

.gitignore

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,57 @@
11
node_modules/
22
built/*
3-
tests/cases/*.js
4-
tests/cases/*/*.js
5-
tests/cases/*/*/*.js
6-
tests/cases/*/*/*/*.js
7-
tests/cases/*/*/*/*/*.js
8-
tests/cases/*.js.map
9-
tests/cases/*/*.js.map
10-
tests/cases/*/*/*.js.map
11-
tests/cases/*/*/*/*.js.map
12-
tests/cases/*/*/*/*/*.js.map
133
tests/cases/rwc/*
144
tests/cases/test262/*
155
tests/cases/perf/*
166
!tests/cases/webharness/compilerToString.js
177
test-args.txt
188
~*.docx
9+
\#*\#
10+
.\#*
1911
tests/baselines/local/*
12+
tests/baselines/local.old/*
2013
tests/services/baselines/local/*
2114
tests/baselines/prototyping/local/*
2215
tests/baselines/rwc/*
2316
tests/baselines/test262/*
24-
tests/baselines/reference/projectOutput/*
17+
tests/baselines/reference/projectOutput/*
2518
tests/baselines/local/projectOutput/*
19+
tests/baselines/reference/testresults.tap
2620
tests/services/baselines/prototyping/local/*
2721
tests/services/browser/typescriptServices.js
22+
scripts/authors.js
23+
scripts/configureNightly.js
2824
scripts/processDiagnosticMessages.d.ts
2925
scripts/processDiagnosticMessages.js
30-
scripts/importDefinitelyTypedTests.js
26+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3127
src/harness/*.js
28+
src/compiler/diagnosticInformationMap.generated.ts
29+
src/compiler/diagnosticMessages.generated.json
3230
rwc-report.html
3331
*.swp
3432
build.json
3533
*.actual
34+
tests/webTestServer.js
35+
tests/webTestServer.js.map
3636
tests/webhost/*.d.ts
3737
tests/webhost/webtsc.js
38-
tests/*.js
39-
tests/*.js.map
40-
tests/*.d.ts
38+
tests/cases/**/*.js
39+
tests/cases/**/*.js.map
4140
*.config
4241
scripts/debug.bat
4342
scripts/run.bat
4443
scripts/word2md.js
4544
scripts/ior.js
4645
scripts/*.js.map
46+
scripts/typings/
4747
coverage/
4848
internal/
4949
**/.DS_Store
50-
.settings/*
51-
!.settings/tasks.json
50+
.settings
51+
**/.vs
52+
**/.vscode
53+
!**/.vscode/tasks.json
54+
!tests/cases/projects/projectOption/**/node_modules
55+
!tests/cases/projects/NodeModulesSearch/**/*
56+
!tests/baselines/reference/project/nodeModules*/**/*
57+
.idea

.mailmap

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+

2+
Alexander <[email protected]># Alexander Kuvaev
3+
AbubakerB <[email protected]> # Abubaker Bashir
4+
Adam Freidin <[email protected]> Adam Freidin <[email protected]>
5+
Adi Dahiya <[email protected]> Adi Dahiya <[email protected]>
6+
Ahmad Farid <[email protected]> ahmad-farid <[email protected]>
7+
Alex Eagle <[email protected]>
8+
Anders Hejlsberg <[email protected]> unknown <[email protected]> unknown <[email protected]>
9+
Andrew Z Allen <[email protected]>
10+
11+
Anil Anar <[email protected]>
12+
Anton Tolmachev <[email protected]>
13+
Arnavion <[email protected]> # Arnav Singh
14+
Arthur Ozga <[email protected]> Arthur Ozga <[email protected]>
15+
Asad Saeeduddin <[email protected]>
16+
Schmavery <[email protected]> # Avery Morin
17+
Basarat Ali Syed <[email protected]> Basarat Syed <[email protected]> basarat <[email protected]>
18+
Bill Ticehurst <[email protected]> Bill Ticehurst <[email protected]>
19+
Ben Duffield <[email protected]>
20+
Blake Embrey <[email protected]>
21+
Bowden Kelly <[email protected]>
22+
Brett Mayen <[email protected]>
23+
Bryan Forbes <[email protected]>
24+
Caitlin Potter <[email protected]>
25+
ChrisBubernak <[email protected]> unknown <[email protected]> # Chris Bubernak
26+
Chuck Jazdzewski <[email protected]>
27+
Colby Russell <[email protected]>
28+
Colin Snover <[email protected]>
29+
Cyrus Najmabadi <[email protected]> CyrusNajmabadi <[email protected]> unknown <[email protected]>
30+
Dan Corder <[email protected]>
31+
32+
Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]>
33+
34+
David Souther <[email protected]>
35+
Denis Nedelyaev <[email protected]>
36+
Dick van den Brink <[email protected]> unknown <[email protected]> unknown <[email protected]>
37+
Dirk Baeumer <[email protected]> Dirk Bäumer <[email protected]> # Dirk Bäumer
38+
Dirk Holtwick <[email protected]>
39+
Doug Ilijev <[email protected]>
40+
Erik Edrosa <[email protected]>
41+
Ethan Rubio <[email protected]>
42+
Evan Martin <[email protected]>
43+
Evan Sebastian <[email protected]>
44+
Eyas <[email protected]> # Eyas Sharaiha
45+
falsandtru <[email protected]> # @falsandtru
46+
Frank Wallis <[email protected]>
47+
František Žiačik <[email protected]> František Žiačik <[email protected]>
48+
Gabriel Isenberg <[email protected]>
49+
Gilad Peleg <[email protected]>
50+
Graeme Wicksted <[email protected]>
51+
Guillaume Salles <[email protected]>
52+
Guy Bedford <[email protected]> guybedford <[email protected]>
53+
Harald Niesche <[email protected]>
54+
Iain Monro <[email protected]>
55+
Ingvar Stepanyan <[email protected]>
56+
impinball <[email protected]> # Isiah Meadows
57+
Ivo Gabe de Wolff <[email protected]>
58+
James Whitney <[email protected]>
59+
Jason Freeman <[email protected]> Jason Freeman <[email protected]>
60+
Jason Killian <[email protected]>
61+
Jason Ramsay <[email protected]> jramsay <[email protected]>
62+
63+
Jeffrey Morlan <[email protected]>
64+
tobisek <[email protected]> # Jiri Tobisek
65+
Johannes Rieken <[email protected]>
66+
John Vilk <[email protected]>
67+
jbondc <[email protected]> jbondc <[email protected]> jbondc <[email protected]> # Jonathan Bond-Caron
68+
Jonathan Park <[email protected]>
69+
Jonathan Turner <[email protected]> Jonathan Turner <[email protected]>
70+
Jonathan Toland <[email protected]>
71+
Jesse Schalken <[email protected]>
72+
Josh Kalderimis <[email protected]>
73+
Josh Soref <[email protected]>
74+
Juan Luis Boya García <[email protected]>
75+
Julian Williams <[email protected]>
76+
Herrington Darkholme <[email protected]>
77+
Kagami Sascha Rosylight <[email protected]> SaschaNaz <[email protected]>
78+
Kanchalai Tanglertsampan <[email protected]> Yui <[email protected]>
79+
Kanchalai Tanglertsampan <[email protected]> Yui T <[email protected]>
80+
Kanchalai Tanglertsampan <[email protected]> Yui <[email protected]>
81+
Kanchalai Tanglertsampan <[email protected]> Yui <[email protected]>
82+
Kanchalai Tanglertsampan <[email protected]> yui T <[email protected]>
83+
Keith Mashinter <[email protected]> kmashint <[email protected]>
84+
Ken Howard <[email protected]>
85+
kimamula <[email protected]> # Kenji Imamula
86+
Kyle Kelley <[email protected]>
87+
Lorant Pinter <[email protected]>
88+
Lucien Greathouse <[email protected]>
89+
Martin Vseticka <[email protected]> Martin Všeticka <[email protected]> MartyIX <[email protected]>
90+
vvakame <[email protected]> # Masahiro Wakame
91+
Matt McCutchen <[email protected]>
92+
Max Deepfield <[email protected]>
93+
Micah Zoltu <[email protected]>
94+
Mohamed Hegazy <[email protected]>
95+
Nathan Shively-Sanders <[email protected]>
96+
Nathan Yee <[email protected]>
97+
Nima Zahedi <[email protected]>
98+
99+
mihailik <[email protected]> # Oleg Mihailik
100+
Oleksandr Chekhovskyi <[email protected]>
101+
Paul van Brenk <[email protected]> Paul van Brenk <[email protected]> unknown <[email protected]> unknown <[email protected]> unknown <[email protected]>
102+
Oskar Segersva¨rd <[email protected]>
103+
pcan <[email protected]> # Piero Cangianiello
104+
pcbro <[email protected]> # @pcbro
105+
Pedro Maltez <[email protected]> # Pedro Maltez
106+
piloopin <[email protected]> # @piloopin
107+
milkisevil <[email protected]> # Philip Bulley
108+
progre <[email protected]> # @progre
109+
Prayag Verma <[email protected]>
110+
Punya Biswal <[email protected]>
111+
Rado Kirov <[email protected]>
112+
Ron Buckton <[email protected]> Ron Buckton <[email protected]>
113+
Richard Knoll <[email protected]> Richard Knoll <[email protected]>
114+
Rowan Wyborn <[email protected]>
115+
Ryan Cavanaugh <[email protected]> Ryan Cavanaugh <[email protected]> Ryan Cavanaugh <[email protected]>
116+
Ryohei Ikegami <[email protected]>
117+
Sarangan Rajamanickam <[email protected]>
118+
Sébastien Arod <[email protected]>
119+
Sheetal Nandi <[email protected]>
120+
Shengping Zhong <[email protected]>
121+
122+
Simon Hürlimann <[email protected]>
123+
Solal Pirelli <[email protected]>
124+
Stan Thomas <[email protected]>
125+
Stanislav Sysoev <[email protected]>
126+
Steve Lucco <[email protected]> steveluc <[email protected]>
127+
Tarik <[email protected]> # Tarik Ozket
128+
Tetsuharu OHZEKI <[email protected]> # Tetsuharu Ohzeki
129+
Tien Nguyen <[email protected]> tien <[email protected]> unknown <[email protected]> #Tien Hoanhtien
130+
Tim Perry <[email protected]>
131+
Tim Viiding-Spader <[email protected]>
132+
Tingan Ho <[email protected]>
133+
togru <[email protected]> # togru
134+
Tomas Grubliauskas <[email protected]>
135+
ToddThomson <[email protected]> # Todd Thomson
136+
TruongSinh Tran-Nguyen <[email protected]>
137+
vilicvane <[email protected]> # Vilic Vane
138+
Vladimir Matveev <[email protected]> vladima <[email protected]> v2m <[email protected]>
139+
Wesley Wigham <[email protected]> Wesley Wigham <[email protected]>
140+
141+
Yuichi Nukiyama <[email protected]> YuichiNukiyama <[email protected]>
142+
Zev Spitz <[email protected]>
143+
Zhengbo Li <[email protected]> zhengbli <[email protected]> Zhengbo Li <Zhengbo Li> Zhengbo Li <[email protected]> tinza123 <[email protected]> unknown <[email protected]> Zhengbo Li <Zhengbo Li>
144+
zhongsp <[email protected]> # Patrick Zhong
145+
T18970237136 <[email protected]> # @T18970237136
146+

.npmignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
built
22
doc
3+
internal
4+
issue_template.md
5+
lib/README.md
6+
pull_request_template.md
37
scripts
48
src
59
tests
6-
Jakefile
10+
tslint.json
11+
Jakefile.js
12+
.editorconfig
13+
.gitattributes
14+
.settings/
715
.travis.yml
8-
.settings/
16+
.vscode/

.travis.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
language: node_js
22

33
node_js:
4+
- 'stable'
5+
- '4'
46
- '0.10'
57

6-
sudo: false
8+
sudo: false
9+
10+
env:
11+
- workerCount=3
12+
13+
matrix:
14+
fast_finish: true
15+
include:
16+
- os: osx
17+
node_js: stable
18+
osx_image: xcode7.3
19+
env: workerCount=2
20+
allow_failures:
21+
- os: osx
22+
23+
branches:
24+
only:
25+
- master
26+
- release-2.0
27+
28+
install:
29+
- npm uninstall typescript
30+
- npm uninstall tslint
31+
- npm install
32+
- npm update
33+
34+
cache:
35+
directories:
36+
- node_modules
37+
38+
git:
39+
depth: 1

.settings/tasks.json renamed to .vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// ${cwd}: the current working directory of the spawned process
88
{
99
"version": "0.1.0",
10-
"command": "jake",
10+
"command": "gulp",
1111
"isShellCommand": true,
1212
"showOutput": "silent",
1313
"tasks": [

0 commit comments

Comments
 (0)