Commit Graph

4110 Commits

Author SHA1 Message Date
Mateusz Burzyński
fc756ebc17 Use missingType instead of undefinedType for optional methods under exactOptionalPropertyTypes (#52519) 2023-03-01 11:25:39 -08:00
Mateusz Burzyński
080f9c1c3f Fixed false positive errors in empty optional binding patterns in declaration signatures (#50816) 2023-03-01 10:58:37 -08:00
Sheetal Nandi
9c5b09cd21 Updates to type reference directive resolution and module resolution when failed (#51715) 2023-03-01 10:57:47 -08:00
Mateusz Burzyński
58ee54c2aa Resolve contextual computed properties with non-bindable names (#51915) 2023-03-01 10:12:18 -08:00
Ron Buckton
73a98aee00 Add tests for Awaited<null> and Awaited<undefined> (#52960) 2023-03-01 12:56:42 -05:00
Mateusz Burzyński
02885b1a2e Fixed an issue with top function type being callable with no arguments (#52387) 2023-03-01 09:35:36 -08:00
Mateusz Burzyński
c6b384ce5c Add an extra test case for an aliased mapped type inference (#52742) 2023-02-28 16:07:47 -08:00
形素叢集・ぐらふぃーむ
57394450db lib Fix Part 1/6 – WeakMap constructor (#50449)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2023-02-28 14:14:30 -08:00
Ron Buckton
8becdf2b40 Fix emit for nested object rest in assignment pattern (#52922) 2023-02-22 20:41:09 -05:00
Jake Bailey
3471bd7d86 Fix type import node circularity errors in eager diagnostic mode, deprecations (#52861) 2023-02-21 15:42:15 -08:00
Jake Bailey
b579516b9e Handle multiple levels of substitutions and indexed accesses in getActualTypeVariable (#52848) 2023-02-21 11:08:51 -08:00
Anders Hejlsberg
5c92af1dcc Fix contextual typing for post-spread tuple elements (#52769) 2023-02-18 07:35:24 -10:00
Jake Bailey
8cc216af03 Ensure parameters are in scope when converting parameter/return types to type nodes (#49627) 2023-02-17 16:46:03 -08:00
Oleksandr T
088fdf6efe fix(51202): Circular instantiation expression crashing IDEs (#51214) 2023-02-17 11:31:45 -08:00
Mateusz Burzyński
a3b516f6ab Add an extra test case for inferring return type of generic class without a constructor (#52741) 2023-02-16 18:56:42 -08:00
Jake Bailey
d79eb02de3 Prefer using enum literal's own base type rather than enum's base type in comparison (#52703) 2023-02-16 07:44:06 -08:00
Anders Hejlsberg
7d00bb078d Widening and non-widening computed enum types (#52542) 2023-02-14 16:25:46 -08:00
Anders Hejlsberg
84b8483206 Improvements to strictSubtypeRelation and getNarrowedType (#52282) 2023-02-14 12:12:42 -08:00
Oleksandr T
a8b4a3b637 fix(52061): Constructor parameters exported as type included in emitted metadata (#52138) 2023-02-14 12:03:54 -08:00
Ron Buckton
f23dd7a7b2 Fix crash in getAwaitedType (#52752) 2023-02-14 11:16:12 -05:00
Anders Hejlsberg
72fb827045 Check conditional types in depth in isTypeParameterAtTopLevel (#52648) 2023-02-14 07:33:22 -08:00
Jake Bailey
79df2bcd35 Don't allow everything to be assignable to string within string mappings like Uppercase/Lowercase (#52734) 2023-02-13 17:58:56 -05:00
Mateusz Burzyński
738b45e219 Fixed crash in checkExportsOnMergedDeclarationsWorker (#52740) 2023-02-13 11:24:15 -08:00
Anders Hejlsberg
c838b0cb7e Consult cached contextual types only when no contextFlags (#52611) 2023-02-10 11:17:59 -08:00
Jake Bailey
0ef9e8eac9 Ensure we treat "type assertions" as JSX within a unary expression (#52667) 2023-02-09 11:34:47 -08:00
Jake Bailey
bec0fdac23 Add test for already fixed issue 49778 (#52668) 2023-02-09 11:04:07 -08:00
Gabriela Araujo Britto
9a14949686 Fix accessing toString of features map (#52340) 2023-02-09 10:22:22 -08:00
Anders Hejlsberg
57ebd99ff2 Exclude typeof this from check in isConstantReference (#52680) 2023-02-09 07:06:09 -08:00
Oleksandr T
cdeb1e3660 feat(48702): Emit for dynamic import (import()) when target >= ES2020 and module == None (#50942) 2023-02-06 16:18:06 -08:00
Mateusz Burzyński
76c23e43da Fixed binding element types coming from the out of tuple bounds under noUncheckedIndexedAccess (#52318) 2023-02-06 16:17:05 -08:00
Jake Bailey
59844e7f6c Don't consult JSDoc outside of JS in expando function assignment declarations (#52640) 2023-02-06 15:28:21 -08:00
Anders Hejlsberg
720ec45be5 Improve handling of corner cases in narrowTypeByInstanceof (#52592) 2023-02-06 11:32:33 -08:00
Oleksandr T
70d14f3de2 fix(52594): this incorrectly applies in TS files in typeToString (#52610) 2023-02-06 08:59:32 -08:00
Mateusz Burzyński
c9b5f2b022 Replace missingType with undefinedType in the IndexedAccessTypeNode's type (#52016) 2023-02-03 16:32:22 -08:00
Tobias S
066c78d590 return baseType in getSubstitutionType when baseType is any (#52573) 2023-02-03 08:35:10 -08:00
Andrew Branch
4ec9b2f8d7 Fix crash when looking for __esModule during symbol table merging (#52554) 2023-02-02 09:27:10 -08:00
Anders Hejlsberg
30993855fd Consistently propagate intersectionState in relations (#52392) 2023-02-02 07:19:00 -08:00
Mateusz Burzyński
c72d9292d9 Fixed accidental propagation of caching-related objectFlags (#52546) 2023-02-01 13:18:19 -08:00
Oleksandr T
3880fce249 fix(52455): destructuring function props with "enum" as property name breaks .d.ts (#52544) 2023-02-01 11:44:22 -08:00
Anders Hejlsberg
d656487fca Permit instantiation expressions in typeof import(...) (#52532) 2023-02-01 09:09:55 -08:00
Jake Bailey
95840557bf Prevent valid JSX from being seen as the start of a generic arrow function, fix crashes (#52450) 2023-01-31 16:55:48 -08:00
Oleksandr T
7c220232f2 fix(52514): overload Tags do not receive noImplicitAny errors on missing return types (#52518) 2023-01-31 09:41:42 -08:00
Oleksandr T
3c0a3e536c fix(52440): typeof ... === "undefined" check on mapped object member doesn't narrow correctly, for only some purposes (#52456) 2023-01-30 10:28:38 -08:00
Jake Bailey
477ec2c3a8 Get export symbol if needed for verbatimModuleSyntax check on default/equals exports (#52448) 2023-01-27 10:13:56 -08:00
Mateusz Burzyński
45c246f28c Fixed a mistake in the narrowingDestructuring test (#52411) 2023-01-25 10:50:29 -08:00
Oliver Radini
a311e25305 Add 2023 array methods to target features (#52242) 2023-01-25 10:31:53 -08:00
Jake Bailey
be488fa075 Revert part of catch clause PR which broke other declarations (#52403) 2023-01-25 10:24:25 -08:00
Jake Bailey
87c808ff2a Add test case for #52271 (#52333)
Fixes https://github.com/microsoft/TypeScript/issues/52271
2023-01-23 11:59:24 -08:00
Oleksandr T
1d81c1dfef fix(51521): Using a of property declared after an initializing constructor triggers an assertion failure in JS (#51524)
Fixes https://github.com/microsoft/TypeScript/issues/51521
2023-01-20 14:43:23 -08:00
Tobeyyy
e01ced050c fix type checking of variables named "exports" (#52209) 2023-01-19 16:59:07 -08:00