Commit Graph

32352 Commits

Author SHA1 Message Date
TypeScript Bot
42915c3529 Update package-lock.json 2021-07-30 06:06:14 +00: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
TypeScript Bot
52ca2dd9cf Update package-lock.json 2021-07-29 06:06:00 +00:00
Oleksandr T
7c197becb6 feat(45210): add inlay hints for getters and setters (#45214) 2021-07-28 14:52:37 -07:00
TypeScript Bot
d1d65cb6b1 Update package-lock.json 2021-07-28 06:06:05 +00: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
Andrew Branch
9334a15f5f Add transitive pnpm import statement completions test (#45186) 2021-07-26 14:24:59 -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
TypeScript Bot
129623943b Update package-lock.json 2021-07-26 06:07:42 +00:00
TypeScript Bot
f449ab1ebc Update package-lock.json 2021-07-25 06:06:00 +00:00
TypeScript Bot
90e15549fe Update package-lock.json 2021-07-24 06:05:56 +00: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
TypeScript Bot
a947bbb6a9 Update package-lock.json 2021-07-23 06:06:15 +00:00
TypeScript Bot
7c4c0a3962 Update package-lock.json 2021-07-22 06:06:22 +00: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
TypeScript Bot
1e2c77e728 Update package-lock.json 2021-07-21 06:07:17 +00: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
TypeScript Bot
4ca716ceb3 Update package-lock.json 2021-07-17 06:06:08 +00: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
csigs
7ef66f647b LEGO: Merge pull request 45072
LEGO: Merge pull request 45072
2021-07-16 10:13:11 -07:00
Andrew Casey
d8f2aaeebf Shorten baseline names (#45054)
Fixes #45051
2021-07-16 10:01:36 -07:00
Oleksandr T
00596e19f5 fix(44168): exclude adding export to existing exported identifier (#44755) 2021-07-16 09:40:17 -07:00
Oleksandr T
23ebe04563 fix(44902): resolve members in Union or Intersection types (#44904) 2021-07-16 09:07:52 -07:00
csigs
e4da7a97a0 LEGO: Merge pull request 45067
LEGO: Merge pull request 45067
2021-07-16 04:13:22 -07:00
Wesley Wigham
8268f2adec Avoid bogus circularity error on context sensitive constructor property assignments (#44601)
* Avoid bogus circularity error on context sensitive constructor property assignments

* Add JS case and ensure its fixed
2021-07-15 17:06:56 -07:00
csigs
87cff4e3bb LEGO: Merge pull request 45060
LEGO: Merge pull request 45060
2021-07-15 16:13:30 -07:00
Andrew Branch
6d3772f357 Fix auto import require of CJS module with module:es2015+ and allowSyntheticDefaultExports (#44955) 2021-07-15 16:08:05 -07:00
Josh Goldberg
541e553163 Specific diagnostic suggestions for unexpected keyword or identifier (#43005)
Error message improvement for unexpected tokens in the following situations:

* A word was parsed that seems to have a low edit distance from a known common keyword
* A word was parsed that seems to be a known common keyword and a name _without_ a space in-between
* Parsing in a particular type of node (mostly a class property declaration) got a different word or token than expected

___

* Specific diagnostic suggestions for unexpected keywords or identifier

* Don't reach into there, that's not allowed

* Improved error when there is already an initializer

* Specific module error message for invalid template literal strings

* Skip 'unexpected keyword or identifier' diagnostics for declare nodes

* Improve error for function calls in type positions

* Switch class properties to old diagnostic

* Corrected errors in class members and reused existing textToKeywordObj map

* Corrected more baselines from the merge

* Update src/compiler/parser.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

* Mostly addressed feedback

* Clarified function call type message

* Split up and clarified parsing vs error functions

* Swap interface name complaints back, and skip new errors on unknown (invalid) tokens

* Used tokenToString, not a raw semicolon

* Inline getExpressionText helper

* Remove remarks in src/compiler/parser.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-07-14 13:50:55 -07:00