Commit graph

30660 commits

Author SHA1 Message Date
Nathan Shively-Sanders 9a65658b28
Parse *= separately in types (#39457)
* Parse *= separately in types

Previously, when the scanner produced `*=` as a single token, the type
parser ran special-case code to produce an "optional all type", which
only makes sense when the `=` really should be attached to the `*`. This
is often not the case.

The correct solution, which I missed when I first wrote this code, is to
have the scanner go back and produce a separate `=` token, which is what
this PR does.

* add test from #38551

* we ❤️ semicolons
2020-07-07 08:30:42 -07:00
csigs c12d431d7e
LEGO: Merge pull request 39460
LEGO: Merge pull request 39460
2020-07-06 21:11:37 -07:00
csigs 4f72ae2638 LEGO: check in for master to temporary branch. 2020-07-07 04:10:42 +00:00
Alexander T 2a92a6ea91
fix(39332): handle quotes preference in interface method signatures (#39348) 2020-07-06 17:00:35 -07:00
Wenlu Wang 453365284c
Avoid check for union keys (#39314) 2020-07-06 15:01:05 -07:00
Nathan Shively-Sanders 0d84f210b7
In JS, assignment to void 0 isn't a declaration (#39452)
Previously, property assignments with `void 0` initialisers were treated
like any other values. But this causes us to choke when checking our own
commonjs emit. This is something that happens by mistake a fair amount,
so this PR goes back to treating these assignments as normal
assignments.

This should allow us to check our own emit in loose cases without
harming other code bases, since `void 0` is rarely written by hand.

Note that other errors still happen: noImplicitAny forbids
accessing undeclared properties on object literals, and strictNullChecks
forbids assigning `undefined` to properties with a different type.
However, this change is enough to unblock compilation with
`strictNullChecks: false`.
2020-07-06 14:00:12 -07:00
Orta Therox 17d8b02796
Retain the original eslint arg order (#39450) 2020-07-06 16:02:56 -04:00
Daniel Rosenwasser 64696225ab
Merge pull request #39418 from a-tarasyuk/feat/25259-diagnostic
feat(25259): Better error report for equals instead of colon in object literals / change diagnostic message
2020-07-06 12:13:49 -07:00
Daniel Rosenwasser 77bf2045d8
Merge pull request #39379 from a-tarasyuk/bug/39346
fix(39346): Intelligent code completion not working in child class with composited base interface
2020-07-06 11:59:30 -07:00
Orta Therox 3593c28692
Adds a script for hooking up dev builds of TS to the playground (#38859) 2020-07-06 12:27:52 -04:00
Orta Therox d462fb2fb9
Split the GH actions CI into multiple stages (#39210)
* Split the GH actions CI into multiple stages

* Add the -- for npm

* Improve the CI reports

* Use stylish formatting on CI

* Break TSC instead

* Try add the problem register for TSC only on node 12

* Fix GH Actions syntax maybe
2020-07-06 12:24:33 -04:00
csigs d66db619ef
LEGO: Merge pull request 39448
LEGO: Merge pull request 39448
2020-07-06 09:11:30 -07:00
csigs 222e18770d LEGO: check in for master to temporary branch. 2020-07-06 16:10:37 +00:00
ShuiRuTian f29e03eea5
autocomplete works for const assertion. (#39412)
* fix 39384

* add test
2020-07-06 08:49:50 -04:00
Alexander T 9f8585913b feat(25259): change diagnostic message 2020-07-04 09:05:47 +03:00
csigs 9a5c0074aa
LEGO: Merge pull request 39417
LEGO: Merge pull request 39417
2020-07-03 21:11:34 -07:00
csigs 7eeecee3b3 LEGO: check in for master to temporary branch. 2020-07-04 04:10:46 +00:00
csigs ab83e3246e
LEGO: Merge pull request 39416
LEGO: Merge pull request 39416
2020-07-03 15:12:02 -07:00
csigs db785545f2 LEGO: check in for master to temporary branch. 2020-07-03 22:11:08 +00:00
Anders Hejlsberg 2fe2f88047
Fix control flow analysis for nested try-catch-finally statements (#39399)
* Fix control flow analysis for nested try-catch-finally statements

* Add tests
2020-07-03 09:51:01 -07:00
csigs fd8ca520ab
LEGO: Merge pull request 39408
LEGO: Merge pull request 39408
2020-07-03 09:11:25 -07:00
csigs bf6c69ba71 LEGO: check in for master to temporary branch. 2020-07-03 16:10:37 +00:00
csigs f2b73501f7
LEGO: Merge pull request 39404
LEGO: Merge pull request 39404
2020-07-03 03:11:25 -07:00
csigs 7c71a7f034 LEGO: check in for master to temporary branch. 2020-07-03 10:10:39 +00:00
Michael Hensler 2d09da6df5
allow consecutive newlines in jsdoc tag comments (#38036) 2020-07-02 14:19:37 -07:00
Nathan Shively-Sanders 93ccc17658
Node-based @deprecated checks (#39323)
* Node-based @deprecated checks

Switch the checker to syntactic checks for `@deprecated` on
declarations. This requires a bit more checking of declarations in the
checker at times, but it

1. Gets rid of work, and a symbol flag, in the binder.
2. Skips work in the checker unless there is a `@deprecated` tag.
3. Makes it fairly simple to only issue errors on particular signatures
   of overloaded functions.

* remove in-progress comment

* remove unused isTypeDeclaration

* ❤️ lint

* support jsx and tagged template functions

* Support decorators too
2020-07-02 14:09:59 -07:00
Ron Buckton 652a1c5950
Emit fallback for decorator metadata for type only imports (#39337) 2020-07-02 11:39:27 -07:00
csigs a60feb2d39
LEGO: Merge pull request 39382
LEGO: Merge pull request 39382
2020-07-02 03:11:36 -07:00
csigs 3d4422adf1 LEGO: check in for master to temporary branch. 2020-07-02 10:10:42 +00:00
Alexander T d137e4a23b fix(39346): show completion in inherited classes from the composited base interface 2020-07-02 11:40:17 +03:00
Ron Buckton 7b942b4fa8
Revert the type change to ts.Map (#39366) 2020-07-01 17:00:26 -07:00
Andrew Casey 852800bb98
Drop dead files from LKG (#39330)
* Delete lib/diagnosticMessages.generated.json

The values are baked in - only the localized json files are needed in
the LKG.

* Delete lib/lib.esnext files no longer found in built/local
2020-07-01 13:55:52 -07:00
Andrew Casey 0e3f25d079
Copy typesMap.json in produceLKG.ts (#39329)
* Copy typesMap.json in produceLKG.ts

It doesn't change very often and there's a hardcoded backup, but this
seems like a booby trap.

* Remove unused import
2020-07-01 13:55:35 -07:00
csigs f27ff08776
LEGO: Merge pull request 39360
LEGO: Merge pull request 39360
2020-07-01 09:11:50 -07:00
csigs 222d47e878 LEGO: check in for master to temporary branch. 2020-07-01 16:10:50 +00:00
Orta Therox 479650fbca
Use MS repo for making monaco builds (#39316) 2020-07-01 11:18:15 -04:00
Nathan Shively-Sanders df5981319f
Fix crash on completion in jsdoc namepath (#39347)
contextToken may be undefined, so the isAssertionExpression call in
filterGlobalCompletion needs to check for undefined.
2020-06-30 15:53:13 -07:00
Nathan Shively-Sanders 0f9d4c78d4
JSDoc uses same newlines as normal scanner (#39351)
* JSDoc uses same newlines as normal scanner

Previously, scanJsDocToken treated each newline character separately, so
the sequence \r\n would be treated as two lines. This is unexpected, and
not the way the normal scanner does it.

This change makes the jsdoc scanner behave the same as the normal
scanner.

* fix lint in test
2020-06-30 15:16:45 -07:00
Andrew Branch e2c5a90cc3
Disable signature help on unresolved bare identifiers; add more declaration info on other unresolved calls (#39352)
* Disable signature help on unresolved bare identifiers; add more declaration info on unresolvedproperty access

* Remove stray ts-ignore
2020-06-30 14:25:27 -07:00
Wesley Wigham ff1f449b99
Fix type of computed name following spread (#39319) 2020-06-30 13:37:59 -07:00
Alexander T 8b6a88700e
fix(32297): add quick-fix action to delete parameter destructuring elements (#38764) 2020-06-30 11:44:47 -07:00
Daniel Rosenwasser a812a7449d
Merge pull request #38792 from microsoft/reportBaseAgainstBooleans 2020-06-30 01:58:51 -07:00
Daniel Rosenwasser 1bbd5ef36b
Merge pull request #38754 from a-tarasyuk/feat/25259
feat(25259): Better error report for equals instead of colon in object literals
2020-06-30 01:56:26 -07:00
Daniel 40c3ffec91 Add assertion. 2020-06-30 01:33:32 -07:00
Daniel 915d4fc060 Accepted baselines. 2020-06-30 01:33:28 -07:00
Daniel ef40ed1ee6 Exempt bare 'boolean's from the check. 2020-06-30 01:12:45 -07:00
Alexander T 21a26ca08a feat(25259): add better error to report for equals instead of the colon in object literals 2020-06-30 10:33:56 +03:00
Daniel Rosenwasser 619658bd44
Merge pull request #39109 from Kingwl/lambda_span
Add outlining spans for call expression or arrow body
2020-06-29 23:33:04 -07:00
Anders Hejlsberg 784396ce95
Infer implied arity before inferring from 'this' argument (#39328)
* Infer implied arity before inferring from 'this' argument

* Add regression test
2020-06-29 17:38:41 -07:00
Andrew Casey 932b314f81 Delete lib/lib.esnext files no longer found in built/local 2020-06-29 15:46:41 -07:00