Commit graph

29744 commits

Author SHA1 Message Date
Orta e804dc8900
Update the authors script to generate the content of authors.md (#36867) 2020-02-27 12:47:09 -05:00
Orta 2c4155c351
Adds underlines to differences in strings (#36409) 2020-02-27 12:46:15 -05:00
Titian Cernicova-Dragomir f883bf3acb
Adding support for @implements. (#36292)
* Adding support for @implements.

* Fixed code review issues for @implements, added some more tests.

* Fixed declaration emit for @interface

* Improved getImplementsTypes to not cache the results since it is only used once.

* Removed unnecessary checks from getImplementsTypes
2020-02-27 09:27:37 -08:00
csigs e3ec3d1942
LEGO: Merge pull request 37080
LEGO: Merge pull request 37080
2020-02-27 08:11:08 -08:00
csigs 5d38883d14 LEGO: check in for master to temporary branch. 2020-02-27 16:10:31 +00:00
csigs a6393b3b85
LEGO: Merge pull request 37074
LEGO: Merge pull request 37074
2020-02-27 02:11:09 -08:00
csigs 97157b460d LEGO: check in for master to temporary branch. 2020-02-27 10:10:32 +00:00
Alexander T baff821594
fix(36989): 'async' modifier cannot be used in an ambient context.ts (#37010)
* fix(36989): omit 'async' modifier for methods in declaration files.

* remove useless condition
2020-02-27 00:11:29 -08:00
csigs 60f50e22bb
LEGO: Merge pull request 37068
LEGO: Merge pull request 37068
2020-02-26 20:11:06 -08:00
csigs 91df1c8b53 LEGO: check in for master to temporary branch. 2020-02-27 04:10:29 +00:00
Sheetal Nandi d07761fe39
Allow --composite false or --composite null on the command line (#36997)
* Add tests for specifying composite as command line option

* Allow passing --composite false on commandline

* Add test to verify tsc --composite false from command line

* Handle "undefined" as option value to be set to undefined for that option

* Support "null" as option to be converted to undefined which is normally end result from our config file as well

* Support null as option for any tsconfig only option as well, and dont support undefined

* Fix public api test case

* Validates objects instead of stringify result

* Add composite true to base source
2020-02-26 15:26:26 -08:00
Sheetal Nandi 05c9ec3f12
Remove unnecessary assert (since we allow already open file to be opened again even through openFile command - partially) from updateOpen command (#37059)
Fixes #35034
2020-02-26 15:25:51 -08:00
Ryan Cavanaugh c4e96856ac
Detect circularities when removing 'undefined' from defaulted params (#37023)
Fixes #37008

Note that referencing a variable in its initializer is a TDZ error;
the OP report had OOB logic that prevented this in practice (?)
2020-02-26 14:59:04 -08:00
csigs f7d2beb3f5
LEGO: Merge pull request 37058
LEGO: Merge pull request 37058
2020-02-26 14:11:15 -08:00
csigs 42058a89ab LEGO: check in for master to temporary branch. 2020-02-26 22:10:40 +00:00
Andrew Casey b424f36e9a
Expose call count for instantiateType in extendedDiagnostics (#36797)
* Expose call count for instantiateType in extendedDiagnostics

* Update API baselines
2020-02-26 12:55:28 -08:00
Nathan Shively-Sanders 3d63401b20
Update baseline (#37049) 2020-02-26 10:28:22 -08:00
Nathan Shively-Sanders af901ba911
No error on this exprs in static property inits (#36781)
No error on `this` expressions in static property declaration
initialisers when targetting ESNext and with useDefineForClassFields. In
this case the emit is correct and the types are correct, so the error
should not be issued.
2020-02-26 09:07:45 -08:00
Wesley Wigham 454cdb8279
Retain undefined initializations (#36806)
* Emit an export assignment even when the initializer is elided

* User a void 0; and elide assignments for enum/namespace-sourced exported variables

* HAHA, SIMPLIFY GREATLY
2020-02-26 08:48:18 -08:00
TypeScript Bot 56b6d0d666
Update user baselines (#37033) 2020-02-25 17:47:21 -08:00
Wesley Wigham 15dd0002ef
Unwrap substitutions both before _and_ after potential simplification (#32116)
* Unwrap substitutions both before _and_ after potential simplification

* Repeatedly unwrap/simplify until no more can be performed

* Use seperate loops for source and target to reduce redundant calls

* Move loop into function

* Inline worker
2020-02-25 17:36:56 -08:00
Wesley Wigham 4d5464e1f9
Revert "Support declaration emit for late bound element accesses assigned to functions in both TS and JS (#36593)" (#37034)
This reverts commit 3e4ce4777d.
2020-02-25 16:40:38 -08:00
Anders Hejlsberg 9ed73ebbbf
Properly handle control flows from returns in try/catch within IIFE (#36901)
* Properly handle control flows from returns in try/catch within IIFE

* Accept new baselines

* Add tests

* Accept new baselines

* When end of finally is unreachable, end of try statement is too

* Add additional test case
2020-02-25 16:14:00 -08:00
Sheetal Nandi e89df5ce6f
Handle getScriptVersion correctly to ensure program structure is checked correctly (#36808)
* Fix tests when there are project references but has disableSourceOfProjectReferenceRedirect

* Handle getScriptVersion correctly to ensure program structure is checked correctly
Fixes #36748

* Harness's language service host doesnt have getProjectVersion.
This means earlier we were creating fresh program everytime we did LS operation
Now we reuse same program, so quick info depends on order of quickinfo demands

* Because same program is used, it unvails a bug that if `export=` is evaluated before finding references, it cant find all definitions from the merge

* Update src/server/project.ts

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Make clearSourceMapperCache required

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-02-25 16:11:21 -08:00
Wesley Wigham e99173a6f9
Ignore data- props when excess property checking (#36952) 2020-02-25 15:52:24 -08:00
Wesley Wigham d92aca2715
Reduce lerna loglevel (#37024)
* Reduce lerna loglevel

* Also add silent
2020-02-25 14:23:55 -08:00
Orta 8a797cad2b
Adds floating block comments to the outlining spans response (#36880)
* Adds floating block comments to the outlining spans response

* Only use one route for grabbing outline nodes, which now includes special casing the EOF token
2020-02-25 17:09:16 -05:00
Ryan Cavanaugh 43863cafe2
Check for undefined source.symbol (#37021)
Fixes #37014
2020-02-25 13:46:24 -08:00
Wesley Wigham 3e4ce4777d
Support declaration emit for late bound element accesses assigned to functions in both TS and JS (#36593) 2020-02-25 13:45:27 -08:00
Wesley Wigham 7d8dc730b7
Baseline arity checks for jsx sfc tags (#36643)
Finish comment

PR feedback
2020-02-25 13:44:22 -08:00
Wesley Wigham e536c89872
Add js-equivalent test for the binary expression stress and introduce trampoline into getJSSyntacticDiagnosticsForFile (#36724)
* Add js-equivalent test for the binary expression stress and introduce trampiline into getJSSyntacticDiagnosticsForFile

* Update src/compiler/parser.ts

Comment text update

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Fix lint

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-02-25 13:29:34 -08:00
Wesley Wigham 01f81dfc00 Add helpers to helper list, per comment on #36806 2020-02-25 11:46:05 -08:00
Ryan Cavanaugh c22cdb446a
Harden telemetryOnOpenFile (#36993) 2020-02-25 11:32:32 -08:00
Wesley Wigham e54b796301
Declare dependencies between helpers in the declaritive fashion introduced by #35967 (#37001) 2020-02-25 11:29:59 -08:00
Wesley Wigham e120762390
Remove unneeded branch from getHelperName (#36998) 2020-02-25 11:29:45 -08:00
csigs 26184f0ec8
LEGO: Merge pull request 37018
LEGO: Merge pull request 37018
2020-02-25 08:11:01 -08:00
csigs 5af94fa0ca LEGO: check in for master to temporary branch. 2020-02-25 16:10:24 +00:00
Ron Buckton 177713ef45
Switch Debug.assertX functions to use asserts conditions (#36995)
* Switch Debug.assertX functions to use asserts conditions

* Replace assert functions with ts.noop when assertion level too low
2020-02-24 18:20:58 -08:00
Andrew Casey b5bd38bcdc
Convert UnionOrIntersectionType.couldContainTypeVariables to ObjectFlags (#36947)
...to save space (and possibly to reduce de-opts, since it appears to be
lazily set).
2020-02-24 18:18:39 -08:00
Andrew Casey 865c1209de
Use couldContainTypeVariables to short-circuit instantiateType (#36951)
This is particularly impactful for large unions of string literals.
2020-02-24 17:50:44 -08:00
Wesley Wigham 6d1361c192 Add --force to vue-next dockerfile since latest image version errors without it 2020-02-24 17:38:16 -08:00
TypeScript Bot 60e172d21d
Update user baselines (#37003) 2020-02-24 17:17:07 -08:00
Wesley Wigham 544f4413b4
Rescedule nightly publish to 11pm pst, (7am ust)
So a nightly publish actually happens at what is night for most of the team.
2020-02-24 17:13:00 -08:00
TypeScript Bot 8fe8284370
Update user baselines (#36999) 2020-02-24 16:18:18 -08:00
Nathan Shively-Sanders 3e3df8702c
Fix crash on aliased,exported @enum tag in jsdoc (#36996)
THe code to bind `@enum` and `@typedef` didn't handle the case that the
`@enum` was on a property assignment to an alias of module.exports.
Specifically, `x` needs to be correctly aliased to the file's symbol in
the example below:

```
var x = module.exports = {};
/** @enum {string} */
x.E = {
  A: "A"
};
```
2020-02-24 16:13:18 -08:00
Wesley Wigham 65e7acce58
Use getters to define live export bindings refresh (#35967)
* use getters to define live export bindings

* fix scoping in export* helper

* Object.defineProperty cannot be used in ES3 target

* Accept changed baselines

* Use function expression, not arrow function

* Update importStarHelper to match export helper in binding-making

* Fix whitespace

* Adjust whitespace in edited helpers

* Use new helper for setting bindings, use unscoped __exportStar helper for exports so helpers get reused more

* Accept updated baselines

* Use __createBinding for individual reexports when target is es3

* Remove unneeded type assertion

* Singeline the helpers

* Add check for createBinding helper, accept updated baselines with shortened helper

Co-authored-by: Michael Rawlings <mirawlings@ebay.com>
2020-02-24 15:36:14 -08:00
TypeScript Bot 7a3b6b4f4f
Update user baselines (#36992) 2020-02-24 14:27:34 -08:00
csigs 4e16be6103
LEGO: Merge pull request 36991
LEGO: Merge pull request 36991
2020-02-24 14:11:09 -08:00
csigs 9ec9d94548 LEGO: check in for master to temporary branch. 2020-02-24 22:10:34 +00:00
TypeScript Bot 3edf5f53d6
Update user baselines (#36973) 2020-02-24 13:46:59 -08:00