23743 Commits

Author SHA1 Message Date
Nathan Shively-Sanders
f1ce0f5528
Visit children of jsdoc type aliases in the binder (#45312)
* Visit children of jsdoc type aliases in the binder

This sets up parent pointers.

Fixes #45254 and almost certainly #45248, though I haven't figured out
to repro the second case.

* move incorrect parenthesis

* manually set comment parent instead

* Bind children of typedef where possible

* add explanatory comment to binding
2021-08-04 07:05:11 -07:00
Jean Pierre
1cbb0bd4d3
Do not classify Infinity and NaN (#44778)
* Do not classify Infinity and NaN. Fixes #42022

* Internally expose so that the classifier can use it

* Increase the test complexity, and revert the type-checker

* Drop the -Infinity

Co-authored-by: Orta <git@orta.io>
2021-08-04 10:00:39 +01:00
Oleksandr T
5971b68231
fix(45224): show inlay hints for setter parameter (#45229) 2021-08-03 11:33:26 -07:00
Oleksandr T
c4080437b2
fix(45102): do not suggest refactoring for functions contains arguments reference (#45116) 2021-08-03 11:31:56 -07:00
Martin Johns
5a2153a729
Fix position of keyword in "Add 'override' modifier" code fix (#45274)
fixes #45270
2021-08-03 11:01:30 -07:00
Orta Therox
ceef6f7cfd
Dev: Have a clickable link for a new baseline created (#44552)
* Have a clickable link for a new baseline created

* Use joinPath instead:
2021-08-03 16:18:39 +01:00
Oleksandr T
39c653cd83
fix: omit inlay hints for setters (#45228) 2021-08-02 16:27:22 -07:00
Daniel Rosenwasser
975aabe788
Ensure all SortText entries have the same length (#45292)
* Ensure all `SortText` entries have the same length.

* Update Baselines and/or Applied Lint Fixes

* Update the exact same enum to the exact same values in fourslash. 🙄

* Make `SortTextId` a const enum, switch to use an explicit offset in `SortTextId`.

Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2021-08-02 16:27:01 -07:00
csigs
f30ba36a2b
LEGO: Merge pull request 45299
LEGO: Merge pull request 45299
2021-08-02 16:13:44 -07:00
Kubilay Kahveci
9cc3070938
expose getImmediateAliasedSymbol() publicly (#44644)
Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com>
2021-08-02 15:57:54 -07:00
Armando Aguirre
642060db6f
Replace non-null assertion with optional chain on assert nodes (#43788) 2021-08-02 15:26:48 -07:00
Oleksandr T
c23abc8957
fix(45192): show implement interface QF for re-exported types (#45245) 2021-08-02 15:19:19 -07:00
Andrew Branch
bfd5b2f7f0
Fix decorator metadata references to type-only-imported namespaces (#44915)
* Add test

* Fix metadata references to type-only-imported namespaces

* Use `!!` instead of `|| false`
2021-08-02 14:18:15 -07:00
Wesley Wigham
7669bfba15
Actually instantiate the type of the annotation used for contextual types (#45285) 2021-08-02 12:44:56 -07:00
Oleksandr T
fcf7bafd57
fix(44812): add outlining spans for comments inside blocks (#44847) 2021-07-30 15:56:32 -07:00
Armando Aguirre
76d754329e
Fix bigInt completions (#45059)
* Fix bigInt completions

* Added regresion test
2021-07-30 14:40:50 -07:00
Andrew Casey
bbd9c3a6e6
Use arrow functions to bind globals correctly in web scenarios (#45242)
* Use arrow functions to bind globals correctly in web scenarios

https://github.com/microsoft/vscode/issues/127700#issuecomment-889443607

* Add missing spread operators
2021-07-30 14:22:30 -07:00
Wenlu Wang
8cdcec4454
Avoid provide hints for binding patterns (#44961)
* Avoid provide hints for binding patterns

* Rename as 56
2021-07-30 09:43:20 -07:00
Andrew Casey
0f6e6efde0
Avoid no-op export map updates (#45238)
* Add id and version to ManyToManyPathMap

...so that unchanged maps can be recognized without having to examine
their contents.

* Track cache version on BuilderState

In practice, `updateExportedFilesMapFromCache` is called repeatedly
without the cache changing in between.  When this occurs, there's no
need to update the `BuilderState` (this was already the net effect, but
it took a long time to determine that no work was required).

* Fix typo in comment
2021-07-30 09:27:32 -07:00
tjjfvi
9d957c64c5
Fix getChildCount/At methods in EndOfFileTokens (#44991)
* Fix getChildCount/At methods in EndOfFileTokens

Before, they were hardcoded to return `0` and `undefined!`, respectively, but that is inaccurate for `EndOfFileToken`s with attached jsdoc.

* Add tests for getChild* methods on EndOfFileTokens
2021-07-30 09:03:19 -07:00
Gabriela Araujo Britto
db0f7938dd
Allow narrowing for any left-hand in operand (#45152)
* allow narrowing for any left-hand in operand
2021-07-29 14:06:45 -07:00
Gabriela Araujo Britto
366e9de264
Fix compiler crash on property symbols without declarations (#45190)
* don't track computed name if symbol has no declaration

* add compiler test

* add non serializable property declaration emit error

* don't track computed name if symbol has no declaration

* fix small stuff

* rebase: add non serializable property declaration emit error

* use symbolToString instead of symbolName
2021-07-29 12:42:54 -07:00
Andrew Branch
62773051e7
Fix import statement completions for export= in JS files (#45128) 2021-07-29 10:28:47 -07:00
Oleksandr T
c79ec7bfbb
fix(45225): do not show add missing member QF for libraries files (#45231) 2021-07-29 10:22:27 -07:00
Eli Barzilay
7e8bba6908 Fix template string refactoring and nodeFactory bug
Instead of letting `createTemplate*` generate a broken raw string from
the cooked one, grab the source code for it.

Also, add a missing bit to `\`-quote `$`s.  As the comment in the code
says, it could just `\`-quote `${` since other `$`s are valid, but I
think that it's less confusing to always quote $s (but the change is in
the comment if minimalism is preferred).

Also, a small-but-confusing bug in `getCookedText()`.

Many tests for all of this.

Fixes #40625
2021-07-29 04:23:06 -04:00
Oleksandr T
7c197becb6
feat(45210): add inlay hints for getters and setters (#45214) 2021-07-28 14:52:37 -07:00
Oleksandr T
b81eb6cfe1
fix(45182): allow property access in arrow function (#45193) 2021-07-27 09:46:17 -07:00
Oleksandr T
85e0e5ad07
fix(44837): add graceful recovery for require completions (#45151) 2021-07-26 15:26:43 -07:00
Wenlu Wang
9665bc6199
Supress hints for access expr too (#45121) 2021-07-26 11:59:14 -07:00
Oleksandr T
11c7daef62
fix(45114): throw an error when using '#' as an identifier (#45124) 2021-07-26 11:39:17 -07:00
Oleksandr T
ba226167bc
fix(45157): omit error after property declaration without semicolon (#45165) 2021-07-26 09:57:58 -07:00
Andrew Branch
48aecfa5a5
Consider module augmentations in files referenced by imports in watch/incremental (#45156)
* Consider module augmentations in files referenced by importsin watch/incremental

* Accept baselines

* Accept other baseline

* Hooray optional chaining

* Delete outdated and unuseful comment
2021-07-23 16:32:52 -07:00
Andrew Branch
f029a8266c
Filter auto imports by symbol flags before resolving module specifiers (#45168)
* Filter auto imports by symbol flags before resolving module specifiers

* Don’t filter types out of import statement completions
2021-07-23 15:56:34 -07:00
Andrew Branch
9c8a90d685
Check cancellation token during exportInfoMap generation (#45138) 2021-07-21 14:17:34 -07:00
Oleksandr T
e064817371
feat(42639): allow narrowing type in 'in' operator with the identifier on the left side (#44893) 2021-07-21 09:10:32 -07:00
Andrew Branch
31d98ec44a
Don’t try to create auto import provider when host program doesn’t exist (#45126)
* Guard against creating auto import provider without host program

* Also don’t pre-seed auto import provider if updateGraph didn’t produce a program

* Rename `isFirstLoad`
2021-07-20 11:16:58 -07:00
Ron Buckton
365b25693c
Fix and validate post-increment/decrement in module emit (#44968) 2021-07-19 13:34:42 -07:00
Andrew Branch
476054ea57
Fix auto import crashes caused by unrelocatable symbols (#45055)
* Add failing test

* Fix auto import crashes caused by unrelocatable symbols

* Use util for testing if symbol is an external module
2021-07-19 10:32:47 -07:00
Andrew Branch
36225c3260
Detect preference for Unode:-prefixed node core modules (#45080) 2021-07-19 09:56:24 -07:00
csigs
ddbd829ea1
LEGO: Merge pull request 45092
LEGO: Merge pull request 45092
2021-07-18 16:17:56 -07:00
csigs
a84ca309e0
LEGO: Merge pull request 45088
LEGO: Merge pull request 45088
2021-07-17 22:14:11 -07:00
csigs
64e19ffc3f
LEGO: Merge pull request 45087
LEGO: Merge pull request 45087
2021-07-17 16:17:42 -07:00
csigs
7ad76171f7
LEGO: Merge pull request 45085
LEGO: Merge pull request 45085
2021-07-17 10:13:32 -07:00
csigs
5e55501ac6
LEGO: Merge pull request 45083
LEGO: Merge pull request 45083
2021-07-16 22:14:50 -07:00
csigs
cf8217fc29
LEGO: Merge pull request 45081
LEGO: Merge pull request 45081
2021-07-16 16:13:58 -07:00
Andrew Branch
b300ef4bc7
Check for watched directories before clearing map (#44947) 2021-07-16 15:35:38 -07:00
Oleksandr T
1aac3555f7
fix(45049): fix diagnostic for missing property initializer (#45052) 2021-07-16 15:10:42 -07:00
Oleksandr T
ba2e2600c8
fix(44701): allow renaming string literal in rhs/lhs of equality (#44708) 2021-07-16 14:45:06 -07:00
Anders Hejlsberg
193b7494d0
Properly propagate silentNeverType in intersections (#45073)
* Properly propagate silentNeverType in intersections

* Add regression test
2021-07-16 11:20:04 -07:00
Wesley Wigham
d0efe9065e
Dont swallow declaration emit errors when issued on nodes without names (#44995) 2021-07-16 10:30:22 -07:00