33813 Commits

Author SHA1 Message Date
Jake Bailey
f16ca7dd36
Remove 'async' dependency, used only in errorCheck.ts, modernize file (#50667) 2022-09-23 09:54:36 -07:00
Alex Hsu
c6bef3f028
LEGO: Merge pull request 50921
LEGO: Merge pull request 50921
2022-09-23 04:35:38 -07:00
TypeScript Bot
675302730b Update package-lock.json 2022-09-23 06:24:32 +00:00
Daniel Rosenwasser
9740bcc534
Pluralized hasInvalidatedResolution -> hasInvalidatedResolutions (#50912)
* Pluralize hasInvalidatedResolution to hasInvalidatedResolutions.

* Accepted baselines.
2022-09-22 18:33:09 -07:00
Sheetal Nandi
a455955aac
Make hasInvalidatedResolution non internal for program and add it watchApi (#50776)
* Make stub for hasInvalidatedResolution

* Wire through hasInvalidatedResolutions
Fixes #48057

* Update comment

* Feedback
2022-09-22 16:51:53 -07:00
Jake Bailey
645d1cd7c1
Fix assert in addIndirectUser in FAR (#50905) 2022-09-22 16:47:27 -07:00
Alex Hsu
bbec17d900
LEGO: Merge pull request 50900
LEGO: Merge pull request 50900
2022-09-22 05:56:42 -07:00
TypeScript Bot
a9ecc675d6 Update package-lock.json 2022-09-22 06:26:44 +00:00
Andrew Branch
221cf55a21
package.json exports should have priority over typesVersions (#50890)
* package.json `exports` should have priority over `typesVersions`

* Test some versioned conditions too
2022-09-21 17:21:51 -07:00
Jake Bailey
acb8977190
Remove .github/tsc.json (#50664) 2022-09-21 17:11:54 -07:00
Oleksandr T
7a3de819bf
fix(49993): skip the quick fix for an expression with an enum type (#50625) 2022-09-21 16:59:17 -07:00
Oleksandr T
2644f28677
fix(49200): skip duplicated method declarations (#50609) 2022-09-21 16:05:40 -07:00
Oleksandr T
4d91204c9d
fix(37030): Expand Selection in function and arrow function skips body block (#50711)
* fix(37030): include curly braces from function body in the selection

* add missed sourceFile argument
2022-09-21 10:47:24 -07:00
Nathan Shively-Sanders
e2dd5084f7
DOM update 2022/09/21 (#50884) 2022-09-21 10:17:08 -07:00
Oleksandr T
1d9ab83914
fix(50866): emit modifiers from export declarations (#50874) 2022-09-21 09:59:15 -07:00
Alex Hsu
92a1b124c1
LEGO: Merge pull request 50877
LEGO: Merge pull request 50877
2022-09-21 05:34:27 -07:00
Jake Bailey
e383db692e
Fix debug.ts __debugKind check (#50871) 2022-09-20 22:48:52 -07:00
Anders Hejlsberg
01054e05ab
Consistently add undefined/missing to optional tuple element types (#50831)
* Consistently add undefined/missing type to optional tuple elements

* Accept new baselines

* Add regression test
2022-09-20 18:14:20 -07:00
Daniel Rosenwasser
d90795e799
Improve escape sequence handling in private names (#50856)
* Add tests for identifiers and private identifiers with escape sequences.

* Accepted baselines.

* Store the tokenValue instead of tokenText on PrivateIdentifiers, since the latter can contain escapes and lead to semantic discrepancies.

* Accepted baselines.

* Check for leading escape sequences in PrivateIdentifiers.

* Accepted baselines.

* Fix lints.
2022-09-20 15:00:39 -07:00
Andrew Branch
938a69a526
Fix import statement completions followed by interface declaration (#50350)
* Fix import statement completions followed by interface declaration

* Fix stuff

* Linty

* Fix when named imports is missing closing brace
2022-09-20 13:29:06 -07:00
Oleksandr T
e002159ad1
feat(49962): Disallow comparison against NaN (#50626)
* feat(49962): disallow comparison against NaN

* change diagnostic message

* use global NaN symbol for NaN equality comparisons
2022-09-20 13:16:44 -07:00
Oleksandr T
23746af766
fix(50591): RangeError: Maximum call stack size exceeded (#50594) 2022-09-20 11:03:18 -07:00
Andrew Branch
168186f93d
Allow a union property of a private/protected member and an intersection property including that same member (#50328) 2022-09-20 10:28:48 -07:00
TypeScript Bot
812ebcf6e3 Update package-lock.json 2022-09-20 06:27:43 +00:00
Jake Bailey
16156b1baf
Add rules from eslint's recommended set that triggered good lints (#50422) 2022-09-19 16:20:55 -07:00
Anders Hejlsberg
a11c41621b
Improve checking of in operator (#50666)
* Improve checking of `in` operator

* Accept new baselines

* Add tests

* Delete old and accept new baselines

* Disallow right operand of type '{}'

* Accept new baselines

* Support number and symbol literals

* Add tests

* Disallow {} typed right operand only in strictNullChecks mode

* Accept new baselines

* Detect {} resulting from intersections

* Accept new baselines

* Don't attempt to reduce intersections with Record<K, unknown>

* Accept new baselines

* Return undefined instead of unknownSymbol from getGlobalRecordSymbol()
2022-09-19 14:16:01 -07:00
Gabriela Araujo Britto
67f2b62ed2
Gabritto/jsemitfixsilly (#50849)
* delete unused test and refactor unneeded ternary

* add parens
2022-09-19 13:32:13 -07:00
Gabriela Araujo Britto
3014dec887
Don't elide imports when transforming JS files (#50404)
* don't elide imports in JS files

* WIP: get rid of caching of resolved symbol, add transform tests

* get rid of caching only for resolver functions

* use getReferencedSymbol instead of getReferencedValueSymbol in module transform

* WIP: add reportErrors flag to resolveName

* Import transformations now work correctly

* don't emit diagnostics when looking up referenced symbol

* small fixes and get rid of unnecessary comments

* update tests

* clean up

* CR: use nameNotFoundMessage to decide whether to report errors in resolveName
2022-09-19 11:36:08 -07:00
Alex Hsu
57c7aa755c
LEGO: Merge pull request 50842
LEGO: Merge pull request 50842
2022-09-19 03:14:37 -07:00
Gabriela Araujo Britto
48a8e8953a
Improve check of whether type query node possibly contains reference to type parameter (#50070)
* WIP

* implement typequery contains reference check + tests

* add unit test

* fix unit test

* use symbols in scope to check type query type parameter references

* remove comment on unit test

* remove comment

* use isNodeDescendantOf implementation to check scoping

* CR: small fixes

* treat the different kinds of type parameter declarations

* undo test change
2022-09-18 21:13:30 -07:00
Alex Hsu
af9ced11f5
LEGO: Merge pull request 50825
LEGO: Merge pull request 50825
2022-09-18 02:59:14 -07:00
Mateusz Burzyński
a8e13f7340
Fixed an issue with destructured bindings from a generic union constraint not being narrowed correctly (#50221) 2022-09-17 14:47:57 -07:00
TypeScript Bot
08af0b6bf0 Update package-lock.json 2022-09-17 06:07:20 +00:00
Daniel Rosenwasser
0df46e8733
Fix test around RegExp match vs. exec results (#50813)
* Fix up test.

* Accepted baselines.
2022-09-16 16:47:33 -07:00
DetachHead
2970c5d167
make RegExpExecArray always include index 0 (#50713)
* make `RegExpExecArray` always include index 0

* update baseline

* remove `BaseRegExpArray` interface

* add test

Co-authored-by: DetachHead <detachhead@users.noreply.github.com>
2022-09-16 15:28:26 -07:00
magic-akari
01cae69e34
fix(50796): omit questionToken in object literal method completions (#50802) 2022-09-16 10:06:03 -07:00
Anders Hejlsberg
3b84f76fb2
Fix crash caused by incorrect bounds check (regression in 4.8) (#50797)
* Fix bounds check

* Add regression test
2022-09-16 07:14:14 -07:00
TypeScript Bot
7e51306d30 Update package-lock.json 2022-09-16 06:25:37 +00:00
Alexis Cheron
8b35c1300e
The error "Object is possibly null or undefined" is ambiguous. (#49797)
* added object name to TS2571, 2531, 2532 and 2533

* updated localized diagnostic messages

* updated baseline to fit diagnostic message change

* Revert "updated localized diagnostic messages"

This reverts commit 738cf094bdb4a1f07d74f90747afe00366549300.

* specialized the error to EntityNameExpression

* updated baseline to fit new changes

* added multiline undefined access test

* added TS18049 - value cannot be used here

* adjusted baseline

* corrected a small linting issue

* Update error numbers after merge from main

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-09-15 16:13:53 -07:00
TypeScript Bot
a3f51b3b82
Update user baselines +cc @sandersn (#43554)
Co-authored-by: typescript-bot <typescript@microsoft.com>
2022-09-15 16:13:09 -07:00
Jake Bailey
ec6ae1c4d0
Partially revert #41044, restoring parameter destructurings in d.ts files (#50779) 2022-09-15 10:24:43 -07:00
Alex Hsu
28232ca4b8
LEGO: Merge pull request 50783
LEGO: Merge pull request 50783
2022-09-15 03:09:43 -07:00
TypeScript Bot
49cfa1db17 Update package-lock.json 2022-09-15 06:22:57 +00:00
Anders Hejlsberg
4110b80fbb
Fix equality narrowing and comparable relation for intersections with {} (#50735)
* Fox equality narrowing and comparable relation for intersections with {}

* Accept new baselines

* Add tests

* Accept new baselines
2022-09-14 09:19:36 -07:00
Alex Hsu
b23f1d6b59
LEGO: Merge pull request 50771
LEGO: Merge pull request 50771
2022-09-14 05:02:40 -07:00
TypeScript Bot
618fb2d8b9 Update package-lock.json 2022-09-14 06:27:15 +00:00
Oleksandr T
08b91f6b82
fix(50717): tsc crashes when it sees a JSDoc tag inside an @override annotation (#50724) 2022-09-13 12:51:17 -07:00
Anders Hejlsberg
60963d7216
Discriminant of type never should never be matched (#50755)
* Discriminant of type 'never' should never be matched

* Add tests
2022-09-13 10:29:50 -07:00
TypeScript Bot
e37ea53715 Update package-lock.json 2022-09-13 06:30:12 +00:00
Sheetal Nandi
a88c36655b
Fix test baselining for tsserver host timeouts (#50748) 2022-09-12 20:36:24 -07:00