Commit Graph

4239 Commits

Author SHA1 Message Date
Mateusz Burzyński 2be814d927 Fixed contextual types of optional properties with exactOptionalPropertyTypes (#55177) 2023-08-08 14:42:50 -07:00
Ryan Cavanaugh 9a771d54e8 Skip parent error when reporting excess property checks (#55152) 2023-08-07 13:31:23 -07:00
Mateusz Burzyński 5ea2952ae5 Resolve JSX intrinsic elements to index signature symbols (#55245) 2023-08-07 11:02:23 -07:00
Ron Buckton b1c4dc475c Fix class name references (#55262) 2023-08-04 20:36:26 -04:00
Mateusz Burzyński 3a7a4d4b51 Error on shadowed var declarations without initializers (#55228) 2023-08-03 10:56:08 -07:00
Mateusz Burzyński 4320104404 Do not include undefined in indexed access on tuple types within range of total fixed elements (#54558) 2023-07-28 15:59:31 -07:00
Anders Hejlsberg c69f4476af Handle composite signatures in isResolvingReturnTypeOfSignature (#55165) 2023-07-26 15:22:58 -07:00
Anders Hejlsberg cbf3c63ef3 Revert overly permissive indexed access constraints (#54845) 2023-07-26 07:02:40 -07:00
Wesley Wigham 970733653c Declaration emit for inlined mapped types preserves modifier-preserving behavior (#55054) 2023-07-24 11:57:36 -07:00
Mateusz Burzyński 5128e06a9d Fixed expando functions with symbol-only properties (#54726) 2023-07-20 13:20:47 -07:00
strager e607c8ed81 fix(54760): Report error for 'declare type' followed by newline (#54761) 2023-07-20 12:13:08 -07:00
Mateusz Burzyński ec48ce89da Fixed expando functions with nullish properties (#54728) 2023-07-20 07:55:35 -07:00
Ron Buckton 97ef321fa0 Fix export of enum with same-named member (#55070) 2023-07-19 15:52:19 -04:00
Mateusz Burzyński 8f96638692 Fixed looking up assigned dynamic names on expando function expressions (#54873) 2023-07-19 09:54:25 -07:00
Jake Bailey 8a85b2aafb Add test case for intersection/constraint bug fixed in 4.9 (#54972) 2023-07-13 16:04:42 -07:00
Ryan Cavanaugh 2516583a0c Ensure all JSX spread properties get visited (#55008) 2023-07-13 09:46:30 -07:00
Jake Bailey 92cbf18e72 Mark return type as referenced for metadata in parameter decorators (#54994) 2023-07-12 12:25:40 -07:00
Mateusz Burzyński bd61cbb1f3 Infer into recursive mapped type targets (#53647) 2023-07-06 13:46:46 -07:00
Joshua Chen e4cc532e14 Make bodiless declarations an error in JS (#54439) 2023-06-30 16:53:51 -07:00
Mateusz Burzyński a3773ec590 Avoid subtype reduction when creating a union result in discriminateTypeByDiscriminableItems (#54052) 2023-06-27 11:55:46 -07:00
Wesley Wigham aec9e23781 Add test which would fail if SFT behavior differs in variance checking (#54756) 2023-06-23 15:32:45 -07:00
Gabriela Araujo Britto 49deff209a Make the implicitly exported rule consistent between checker and binder (#54659) 2023-06-22 12:27:53 -07:00
Gabriela Araujo Britto f647b11846 Use function that doesn't return unknown type (#54713) 2023-06-20 13:47:12 -07:00
Anders Hejlsberg 84d8429fb6 Add depth limiter to isConstTypeVariable function (#54624) 2023-06-16 12:48:44 -07:00
Gabriela Araujo Britto 03951f2ddf Consider index signatures as optional properties in contextual type discrimination (#54596) 2023-06-13 09:57:51 -07:00
Anders Hejlsberg 89cbea8e16 No this type arguments in base constraints (#54536) 2023-06-12 19:07:44 -07:00
leoelm eeed72171f Type definitions for 'Symbols as WeakMap keys' (#76) (#54195)
Signed-off-by: Leo Elmecker <lelmeckerpla@bloomberg.net>
2023-06-09 14:20:26 -04:00
Andrew Branch 2f4962a89f Remove implicit tests/cases/compiler path prefix from VFS test files (#54557) 2023-06-09 09:23:21 -07:00
Andrew Branch d5a6c8edc6 Test harness fixes (#54556) 2023-06-06 17:22:33 -07:00
Andrew Branch 160d1b7d0a Process only tsconfig-referenced files in compiler tests with tsconfig files (#54506) 2023-06-05 15:05:50 -07:00
Oleksandr T b03926ea78 fix(54411): Compiled code contain jsx code (#54425) 2023-06-01 14:01:25 -04:00
Andrew Branch fec0bd3275 Resolve tslib re-exports before checking arity (#54450) 2023-05-30 13:47:06 -07:00
Oleksandr T 13169870b4 fix(54152): Cannot use const enum to define an interface key in isolatedModules mode (#54165) 2023-05-24 12:14:19 -07:00
Mateusz Burzyński 7baf6cd120 Avoid infinite recursion when instantiating circular inline mapped generic tuple type (#53522) 2023-05-24 11:41:04 -07:00
Mateusz Burzyński fefcb81d48 Add extra tests for recursive conditional types (#54030) 2023-05-24 10:50:10 -07:00
Mateusz Burzyński 1518cd98f4 Fixed declaration emit for undefined properties inferred from functions in other array elements (#53938) 2023-05-24 10:19:01 -07:00
Anders Hejlsberg 6f7704e0e2 Properly handle typeof this.xxx in isTypeParameterPossiblyReferenced (#54208) 2023-05-20 09:37:35 -04:00
Anders Hejlsberg 1ea21e1ef1 Fix isGenericReducibleType to allow HKT technique to function again (#54112) 2023-05-20 09:36:38 -04:00
Anders Hejlsberg 215fe6ef75 Fix creation of composite union type predicates (#54169) 2023-05-19 16:15:46 -04:00
Andrew Branch 2b7d517907 Resolve re-exports when looking for tslib helpers (#54317) 2023-05-19 10:13:53 -07:00
Mateusz Burzyński 074f20877d Fix JSX inference with excess properties (#53810) 2023-05-16 15:30:50 -07:00
Wesley Wigham b0c80207ac Add fallback logic for generating signatures for unions of array members (#53489) 2023-05-16 15:12:37 -07:00
Mateusz Burzyński cb88998063 Evaluate simple template expressions (#53907) 2023-05-15 12:51:06 -07:00
Nathan Shively-Sanders 72037a9796 Skip resolving files directly inside node_modules (#52809) 2023-05-11 08:16:17 -07:00
Wesley Wigham 02bb3108ad JSX namespace names should not be considered expressions (#54104) 2023-05-09 10:45:58 -07:00
Mateusz Burzyński 6947c98929 Fixed issue with spreading a generic call expression into generic JSX and gather intra expression inference sites from spread expressions (#53444) 2023-05-08 13:53:15 -07:00
Ryan Cavanaugh e9cbebbc89 Ignore self tail calls when collecting the return type of a function (#53995) 2023-05-05 10:16:11 -07:00
Ron Buckton f9a7cbfe7b Fix crash in getAwaitedType (#54107) 2023-05-03 15:40:51 -04:00
Anders Hejlsberg 94564cf073 Type with diverging read/write normalizations still identical to itself (#54033) 2023-05-02 06:40:41 -07:00
Anders Hejlsberg ae6393e5eb Add fallback when both co- and contra-variant inference candidates exist (#54072) 2023-05-02 06:39:57 -07:00