Commit Graph

4219 Commits

Author SHA1 Message Date
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
Ron Buckton 611a912dd1 Fix class alias reference in static initializer for legacy class decorators (#54046) 2023-04-28 15:45:40 -04:00
Mateusz Burzyński 2cbfb51ebb Fixed JSX attributes discriminating based on optional children (#53980) 2023-04-26 13:39:08 -07:00
Oleksandr T 546be4b360 fix(53735): Definition file generated from javascript is missing getter (#53768) 2023-04-25 14:42:15 -07:00
Wesley Wigham a177af1cc8 Instantiate generic ElementType declarations (#53943) 2023-04-24 13:25:39 -07:00
Sheetal Nandi bd4f40317c Library resolution should happen from config file directory if present just like auto type reference directive resolution (#53899) 2023-04-18 14:40:20 -07:00
Oleksandr T 020ce0c08c feat(7411): Add additional test cases (#53809) 2023-04-17 09:44:34 -07:00
Anders Hejlsberg e782cef221 Properly handle partial union type properties in isTypePresencePossible (#53794) 2023-04-16 17:24:10 -07:00
Oleksandr T 378ffa4bc9 feat(7411): Resolve intrinsics elements by JSX namespaced tag names (#53799) 2023-04-16 17:20:10 -07:00
Anders Hejlsberg f8b3ea7972 Propagate errorType in getConditionalType (#53801) 2023-04-16 16:15:55 -07:00
Anders Hejlsberg e49db97f97 Exclude parameters of non-inferrable signatures from inference (#53756) 2023-04-14 12:44:37 -07:00
Sebastian Silbermann b92483f20c RFC: Consult new JSX.ElementType for valid JSX element types (#51328)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2023-04-14 10:54:02 -07:00
Josh Goldberg ✨ 0023505dc7 Removed unnecessary use-before-define error for const enums (#53625) 2023-04-12 13:38:29 -07:00
Gabriela Araujo Britto 2db688e36f Reset type resolution stack when starting to compute variance (#53549) 2023-04-11 14:05:31 -07:00
Luca Pizzini af5e8e2e4e fix(lib.d.ts): fixed buffer parameter type of DataView (#53130) 2023-04-11 08:19:25 -07:00
Nicolas Rodriguez 7b2b6a8cc2 fix(19577): fix regression with fully inferred types and non-null assertions (#50092) 2023-04-10 17:32:56 -07:00
Ryan Cavanaugh c89f87f66a Detect malformed UTF-8 files and refuse to engage further (#53667) 2023-04-07 12:51:47 -07:00
Jake Bailey 7f6376794e Reuse operandType in checkPrefixUnaryExpression (#53682) 2023-04-06 13:37:12 -07:00
Jake Bailey f243b987af Fix crash in parseJsxChild found by fuzzing (#53674) 2023-04-05 13:47:02 -07:00
Jake Bailey bebb6d0086 Disable JSX recovery hack when in unary expression context (#53666) 2023-04-05 13:04:37 -07:00
Jake Bailey a720ba921f Fix crash when private id in array assignment (#53665) 2023-04-05 13:04:13 -07:00