34689 Commits

Author SHA1 Message Date
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 23f641cddbcb6b55eec764eb6b3895beba731c38.

* 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
Andreas Buob
8b6f8730c1
fix(51223): Go-to-definition for yield and await keyword; jump to respective function definition (#51838) 2022-12-20 13:29:59 -08:00
Oleksandr T
e73a51d5d7
fix(51820): disallow using readonly and declare with auto-accessor (#51824) 2022-12-20 13:25:33 -08:00
Oleksandr T
6f4d340458
fix(51716): find all references in imported JSDoc types (#51729) 2022-12-20 13:16:17 -08:00
Mateusz Burzyński
cf68a12d69
Improve string literal completions for property values when a partially-typed string fixes inference to a type parameter (#51770) 2022-12-20 13:08:55 -08:00
TypeScript Bot
5d8ef4bdcb Update package-lock.json 2022-12-20 06:06:31 +00:00
Andrew Branch
714d7341cf
--moduleResoltuion bunlder: Allow import assignment in ambient contexts (#51971) 2022-12-19 17:03:50 -08:00
Oleksandr T
5951ee9cff
feat(48665): tsconfig "extends" field ignores "exports" field of source package (#50955)
* feat(48665): resolve configs from the exports field of the source package

* add missed property

* rename loadFileName to loadFileNameFromPackageJsonField

* Apply suggestions from code review

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-12-19 16:40:12 -08:00
Gabriela Araujo Britto
0f5e037e1d
pass isSingle quote preference when building string literal (#51968) 2022-12-19 15:39:39 -08:00
Ron Buckton
eb1e257072
Support outlining in multiline import/export decls (#51937) 2022-12-19 15:22:43 -08:00
Jake Bailey
ef70a289b8
Go back to using explicit node verisons in CI (#51965)
Fixes https://github.com/microsoft/TypeScript/issues/51943
2022-12-19 15:20:06 -08:00
TypeScript Bot
70ee780785 Update package-lock.json 2022-12-18 06:06:23 +00:00
Anders Hejlsberg
02d5b23aae
Allow const modifiers on class expression type parameters (#51935)
* Allow `const` modifiers on class expression type parameters

* Add regression test
2022-12-17 10:32:27 -08:00
TypeScript Bot
4932c8788b Update package-lock.json 2022-12-17 06:06:43 +00:00
Anders Hejlsberg
fede84e85b
const modifier on type parameters (#51865)
* `const` modifier on type parameters + revised contextual type logic

* Accept new baselines

* Fix modifier checking

* Add tests

* Cache isConstTypeVariable check

* Revert "Cache isConstTypeVariable check"

This reverts commit f8fd1fd29f7975fcc3aeac8675c2cb107da33065.

* Fewer isConstTypeParameterContext checks

* Pay attention to cached `undefined` contextual type

* Allow `const` modifier in more places + properly print back

* Also permit `const` in method signature type parameters

* Fix parsing of `const` modifier in array expression type parameters

* Accept new baselines

* Remove unused properties from NodeLinks

* Rename `permitInvalidConstAsModifier` to `permitConstAsModifier`
2022-12-16 13:47:10 -08:00
Josh Goldberg
2484390af8
Added override keyword to codefix implemented abstract methods (#51033)
* Added override keyword to codefixed implemented abstract methods

* Only when noImplicitOverrides is true, and always check abstract modifier

* Added test on abstract/override already being there

* Added back a few test cases

* Check declaration modifier, not class modifier
2022-12-16 11:59:21 -08:00
Oleksandr T
193a8a74c8
skip optional parameters in js files (#51924) 2022-12-16 11:51:41 -08:00
Oleksandr T
645b3ddb06
fix(51920): skip TypeScript types in js files (#51922) 2022-12-16 10:35:35 -08:00
Oleksandr T
20f3060da5
Add JSDocOverloadTag to ForEachChildTable (#51907)
* add JSDocOverloadTag to ForEachChildTable

* fix tests

* change imports order
2022-12-16 08:41:32 -08:00
Anders Hejlsberg
ba793e6069
Fix excess property checking for intersections with index signatures (#51894)
* Fix excess property checking for intersections with index signatures

* Add regression tests

* Limit check to only fresh object literals on the source side
2022-12-16 06:59:23 -08:00
Oleksandr T
ff919e3b76
Remove isJSDocOptionalParameter and isOptionalDeclaration from public API (#51908) 2022-12-15 11:45:17 -08:00