Commit Graph

34209 Commits

Author SHA1 Message Date
Jake Bailey
28e4c81794 Tweak co/contra inference logic from #52123 (#52180) 2023-01-10 17:08:36 -08:00
Andrew Branch
14b0d6d4bf Fix nested package json lookup in modes that respect package.json exports (#51995) 2023-01-10 16:18:26 -08:00
Jake Bailey
b3eca6883c Suppress resolvedUsingTsExtension during loadModuleFromDirectory (#52189) 2023-01-10 16:05:44 -08:00
Mateusz Burzyński
3da4886c76 Fixed an issue with quickInfo crashing on a function property returned from generic function (#49049) 2023-01-10 16:05:01 -08:00
Andrew Branch
ec9f6a428b Ensure self-name resolution uses same extension priorities as external imports (#52185) 2023-01-10 13:57:50 -08:00
Mateusz Burzyński
32da8a2856 Add a test for indexed access on generic mapped type (#52069) 2023-01-10 13:46:20 -08:00
Mateusz Burzyński
48b6b8b1d9 Add a regression test for mapped type with as clause that bypassed interface extension check (#52070) 2023-01-10 13:45:38 -08:00
Josh Goldberg
67cdaf9215 Fixed crash when reporting infer extends on invalid name with declaration (#52032) 2023-01-10 13:11:24 -08:00
Mateusz Burzyński
94afa32925 Add an extra test case for circular base type (#52071) 2023-01-10 13:04:58 -08:00
Gabriela Araujo Britto
2082ef2e3f fix narrowTypeByDiscriminant for non null expression access (#52136) 2023-01-10 09:49:13 -08:00
TypeScript Bot
280e3ac85e Update package-lock.json 2023-01-10 06:06:48 +00:00
Wesley Wigham
89e928e8b4 Add --allowArbitraryExtensions, a flag for allowing arbitrary extensions on import paths (#51435) 2023-01-09 17:12:42 -08:00
Mateusz Burzyński
9b718d0a70 Add tests for excess property check for intersection containing a recursive type (#52063) 2023-01-09 16:02:17 -08:00
Stephen Hicks
6bedd1c227 Allow indirect calls (#51989)
Co-authored-by: Klaus Meinhardt <klaus.meinhardt1@gmail.com>
2023-01-09 15:56:33 -08:00
Oleksandr T
394a777fdd fix(51963): Invalid property read for find-all-references when exporting non-existent binding (#52006) 2023-01-09 15:29:33 -08:00
Mateusz Burzyński
f326cbfb2e Add a test for optional members completions within an object within an index signature constraint (#52149) 2023-01-09 11:06:07 -08:00
Mateusz Burzyński
2c1fda249f Fixed false positive circular errors for await expressions with simple non-generic calls in CFA loops (#51126) 2023-01-09 13:56:52 -05:00
Wesley Wigham
00567618bd Reuse existing module specifiers in js declaration emit (#52089) 2023-01-09 10:15:42 -08:00
Wesley Wigham
11bc7b758d Issue error on export= in esm mode declaration file (#52109) 2023-01-09 10:15:23 -08:00
Vitaly
4b69e1342e Basic JSX attribute snippet fixes (#51855)
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2023-01-09 09:13:27 -08:00
TypeScript Bot
fdb5dc56b0 Update package-lock.json 2023-01-09 06:06:33 +00:00
TypeScript Bot
83e8de85ce Update package-lock.json 2023-01-08 06:06:15 +00:00
TypeScript Bot
12718ad88e Update package-lock.json 2023-01-07 06:06:11 +00:00
Ron Buckton
90fb764a0f Fix private name generation and missing emit for auto-accessors (#52132) 2023-01-06 21:08:51 -05:00
Jake Bailey
f1ff0de943 Use native generators/iterables, remove helper cruft (#51921) 2023-01-06 14:40:56 -08:00
Gabriela Araujo Britto
e60c210c57 Improve JSX invalid children type error (#52105) 2023-01-06 10:26:53 -08:00
Anders Hejlsberg
400e2c2bd8 Defer conditional types with multi-element tuple types in extends clause (#52091) 2023-01-06 09:18:12 -08:00
Anders Hejlsberg
fc8538608b Improve logic that chooses co- vs. contra-variant inferences (#52123) 2023-01-06 07:56:51 -08:00
TypeScript Bot
4b52d3a61a Update package-lock.json 2023-01-06 06:06:27 +00:00
Jake Bailey
bfeb927d43 Remove Push from public API (#52122) 2023-01-05 16:18:53 -08:00
Jake Bailey
91822db8e0 Remove doc folder (old archived spec and assets), word2md script (#51791) 2023-01-05 13:49:00 -08:00
Oleksandr T
c57fea2a0d fix(52050): The space before satisfies after an array expression is removed when auto-formatting the statements (#52053) 2023-01-05 13:30:11 -08:00
Gabriela Araujo Britto
aae3115838 Call getTypeOfSymbol in getNarrowedTypeOfSymbol to avoid running into circularities when computing types (#51914) 2023-01-05 13:12:56 -08:00
Jake Bailey
3c7660a37b Make Collection and ReadonlyCollection internal (#51964) 2023-01-05 10:22:32 -08:00
TypeScript Bot
bae715fca2 Update package-lock.json 2023-01-05 06:06:06 +00:00
Oleksandr T
4378441e0c fix(51198): The 'this' context of type 'T' is not assignable to method's 'this' of type 'this' (#51216)
* fix(51198): skip checking this context of type assignable to super

* update comment
2023-01-04 12:05:19 -08:00
Ron Buckton
f43cd0acca Add RegExp indices and hasIndices (#52085)
* Add RegExp indices
* update --lib message
* newlines
* implement changes
* Fix failing tests

Thanks @xiBread!
2023-01-03 15:20:10 -05:00
Mateusz Burzyński
31d1d63fc8 Infer fixed-size tuples from infer type parameters with extends clauses at variadic positions (#51157)
* Infer fixed-size tuples from infer type parameters with extends clauses at variadic positions

* Improve the fix to handle tuples with leading variadic elements

* Fixed indentation

* Infer rest element following a variadic element with a fixed-size constraint

* Infer rest element preceding a variadic element with a fixed-size constraint

* Rewrite the test to avoid accidental union reductions
2023-01-03 10:18:09 -08:00
TypeScript Bot
1a943d7b68 Update package-lock.json 2023-01-03 06:06:24 +00:00
TypeScript Bot
eb3d6faa56 Update package-lock.json 2023-01-02 06:06:33 +00:00
TypeScript Bot
747172e649 Update package-lock.json 2022-12-31 06:06:49 +00:00
Mateusz Burzyński
e9cd2e14db Allow forward references in computed properties of type declarations (#50824)
* Allow forward references in type declarations

* address PR feedback
2022-12-30 11:37:33 -08:00
Oleksandr T
79244c578f remove unused node flag (#52052) 2022-12-30 08:57:33 -08:00
Oleksandr T
44152bc22e fix(29648): Error message related to JSDoc for non-JSDoc syntax error (#50793)
* fix(29648): improve diagnostics of non-JSDoc syntax errors

* fix lint errors

* update tests

* change diagnostic type suggestion. fix QF for jsdoc nullable type

* move error handling from the parser to the checker

* change diagnostic message. remove speculative parsing

* update baseline
2022-12-29 16:50:57 -08:00
Oleksandr T
ba393b6b9f fix(51760): Nullish-coalescing assignment narrows type to assigned value (#51767)
* fix(51760): skip type guard errors for narrowed nullish-coalescing assignment

* update tests
2022-12-29 16:36:59 -08:00
ronyhe
c7f49bceed Add undefined to JSON.stringify return type (#51897)
* First attempt

* Revert "First attempt"

This reverts commit 23f641cddb.

* Second try

* Accept baslines
2022-12-28 09:06:03 -08:00
TypeScript Bot
df6881725c Update package-lock.json 2022-12-28 06:06:36 +00:00
TypeScript Bot
68df4befd6 Update package-lock.json 2022-12-27 06:06:39 +00:00
Anders Hejlsberg
acf854b636 Keep track of multiple current inference contexts (#51978)
* Keep track of multiple current inference contexts

* Add regression test
2022-12-22 07:52:49 -10:00
TypeScript Bot
54a554d8af Update package-lock.json 2022-12-21 06:06:30 +00:00