Commit Graph
100 Commits
Author SHA1 Message Date
Mateusz Burzyński 56accb08a1 Fixed string completions that require escaping (#55118) 2023-09-21 15:05:34 -07:00
Mateusz Burzyński 6e01b06616 Use const context in intersections containing const type variables (#55779) 2023-09-19 14:26:14 -07:00
Mateusz Burzyński 1f88596bb1 Narrow by comparisons to boolean literals (#53714) 2023-09-19 13:38:31 -07:00
Mateusz Burzyński 0464e91c8b Fixed an issue with type-only import promoting (#55365) 2023-09-18 12:38:00 -07:00
Mateusz Burzyński 70b7de11fb Narrow by clause expressions in switches with true condition (#53681) 2023-09-18 12:07:17 -07:00
Mateusz Burzyński e9af22ace9 Consistently return errorType for super expressions in classes that extend null (#55506) 2023-09-14 19:31:50 -07:00
Mateusz Burzyński e6321d77c7 Fixed element access expression writes for divergent write types (#55585) 2023-09-13 16:14:07 -07:00
Mateusz Burzyński 21b8892d21 Fixed an issue with errors not being correctly reported after completion requests in functions within nested calls (#54944) 2023-09-13 15:48:40 -07:00
Mateusz Burzyński 4c34a181c3 Fixed declaration emit for expando properties on function declarations declared using element access expressions (#55183) 2023-09-13 12:07:33 -07:00
Mateusz Burzyński 647c41d26e Fixed JSDoc get-only accessors to be serialized as const (#55444) 2023-09-13 11:38:56 -07:00
Mateusz Burzyński f996bab056 Preserve readonly on mapped index signatures (#55541) 2023-09-13 11:34:50 -07:00
Mateusz Burzyński 543d7ed00c Fixed display of optional and rest parameters created as result of combining union parameters (#55625) 2023-09-13 11:25:19 -07:00
Mateusz Burzyński 4b0f54fe9f Fixed cache key computation for tuple target types with partially named members (#55695) 2023-09-11 14:41:08 -07:00
Mateusz Burzyński f424a6be05 Discriminate types with divergent read/write property types (#55576) 2023-08-30 14:55:11 -07:00
Mateusz Burzyński 9f9a72a2eb Disallow object prototype property access on const enums (#55424) 2023-08-28 19:29:52 -07:00
Mateusz Burzyński 418494e4c4 Infer from parameters annotated using JSDoc (#55400) 2023-08-28 16:02:52 -07:00
Mateusz Burzyński 32ebbe05dc Transfer all declared symbols onto the type from the interface that extends another (#55252) 2023-08-28 15:17:44 -07:00
Mateusz Burzyński 9a6a4ab1d5 Fixed a string completions regression when requested directly in argument position (#55552) 2023-08-28 15:04:06 -07:00
Mateusz Burzyński fe70ec984e Parse reserved identifiers as dotted names of ambient modules (#55282) 2023-08-28 14:48:20 -07:00
Mateusz Burzyński 4b15830a1f Add an extra test for as const satisfies with a mutable array (#55522) 2023-08-28 00:02:00 -07:00
Mateusz Burzyński 27a5bdd446 Add a test for finding all references of same-named imports from two missing modules (#55519) 2023-08-26 08:58:48 -07:00
Mateusz Burzyński 270a471e11 Add a test case with a generic member call returning a closed over object (#55514) 2023-08-26 08:57:57 -07:00
Mateusz Burzyński 5b9547b1ba Add a fourslash completions test related to JSDoc @template on prototype method (#55513) 2023-08-26 08:57:45 -07:00
Mateusz Burzyński e0a324b050 Don't parse DotDotDotToken in JSX attribute values (#55284) 2023-08-24 10:17:33 -07:00
Mateusz Burzyński fecbae5d2e Fixed a regression in serializing setters with non-function declarations in JS files (#55492) 2023-08-24 09:45:58 -07:00
Mateusz Burzyński f07077c7ff Fixed a redundant used before defined error (#55283) 2023-08-24 08:35:48 -07:00
Mateusz Burzyński 97d8c83bce Fixed serialization of param names in setters from JS files (#55393) 2023-08-22 09:54:09 -07:00
Mateusz Burzyński e99508b863 Make contextually-typed parameter with question token optional (#54960) 2023-08-21 15:01:07 -07:00
Mateusz Burzyński 3b49ce99e2 Fixed contravariant inferences from annotated optional parameters (#55397) 2023-08-16 14:49:11 -07:00
Mateusz Burzyński 08b2566e5b Add extra tests for type and value symbol merging (#55387) 2023-08-16 13:04:35 -07:00
Mateusz Burzyński cac899d44d Widen widening literal types through compound-like assignments (#52493) 2023-08-15 16:53:11 -07:00
Mateusz Burzyński b8b0d26cb9 Display write type for property accesses in write locations (#54777) 2023-08-15 12:01:21 -07:00
Mateusz Burzyński 8863e2f57a Discriminate contextual types using shorthand properties (#55151) 2023-08-15 08:58:59 -07:00
Mateusz Burzyński f5e73d7e60 Add additional information section to the bug report template (#55360) 2023-08-14 14:03:31 -07:00
Mateusz Burzyński 16dab6d5d6 Preserve input key style of computed properties in declaration emit (#55298) 2023-08-14 13:13:42 -07:00
Mateusz BurzyńskiandDamien Engels 38553696e2 Fixed hasInvalidEscape implementation (#55373)
Co-authored-by: Damien Engels <engels@google.com>
2023-08-14 13:13:32 -07:00
Mateusz Burzyński 28cd1fbd13 Allow intersections to be used as valid types for template literal placeholders (#54188) 2023-08-10 12:50:21 -07:00
Mateusz Burzyński 2be814d927 Fixed contextual types of optional properties with exactOptionalPropertyTypes (#55177) 2023-08-08 14:42:50 -07:00
Mateusz Burzyński ad7881685a Bring comments for InferenceFlags up to date (#55191) 2023-08-08 14:39:31 -07:00
Mateusz Burzyński f0c3c3f6ea Disallow numeric literals with negative numbers (#55268) 2023-08-07 19:03:56 -04:00
Mateusz Burzyński 5ea2952ae5 Resolve JSX intrinsic elements to index signature symbols (#55245) 2023-08-07 11:02:23 -07:00
Mateusz Burzyński 3a7a4d4b51 Error on shadowed var declarations without initializers (#55228) 2023-08-03 10:56:08 -07:00
Mateusz Burzyński 1481750043 Correctly error on enum member values referring to identifiers shadowing Infinity and NaN (#55018) 2023-08-02 15:55:55 -07:00
Mateusz Burzyński defe33afa1 Do not offer completions for default module member symbol (#55231) 2023-08-01 14:52:40 -07:00
Mateusz BurzyńskiandOleksandr T 6c942fa2c9 Wrap inline negative const enum with parens (#55065)
Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
2023-07-31 16:33:51 -07:00
Mateusz Burzyński 6037cf5db8 Provide member completions after dot in type locations using typeof (#54486) 2023-07-28 15:59:52 -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
Mateusz Burzyński b211fe9792 Fixed quick info display for aliased symbols in type-narrowed locations (#54763) 2023-07-20 13:55:23 -07:00
Mateusz Burzyński 5128e06a9d Fixed expando functions with symbol-only properties (#54726) 2023-07-20 13:20:47 -07:00
Mateusz BurzyńskiandEvan Wallace 2623fe7049 Fixed false positive syntax errors with in inside for (#54801)
Co-authored-by: Evan Wallace <evan.exe@gmail.com>
2023-07-20 12:13:44 -07:00
Mateusz Burzyński ec48ce89da Fixed expando functions with nullish properties (#54728) 2023-07-20 07:55:35 -07:00
Mateusz Burzyński 8f96638692 Fixed looking up assigned dynamic names on expando function expressions (#54873) 2023-07-19 09:54:25 -07:00
Mateusz Burzyński adf5e8443b Grab the left type when narrowing by in operator lazily (#54795) 2023-07-19 10:46:19 -04:00
Mateusz Burzyński bd61cbb1f3 Infer into recursive mapped type targets (#53647) 2023-07-06 13:46:46 -07:00
Mateusz Burzyński 3073b5209b Extend isTupleLikeType to also check if .length is a number literal type (#52617) 2023-06-29 19:13:02 -07:00
Mateusz Burzyński 18e19492be Fixed parenthesized array literal expressions spread in calls not being tupleized (#54623) 2023-06-29 10:15:19 -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
Mateusz Burzyński c58cc39a15 Fixed baselines that were comitted using the old format (#54791) 2023-06-26 16:41:06 -07:00
Mateusz Burzyński 4cac28ed57 Remove unused diagnostic 2346 (#54442) 2023-06-26 11:43:09 -07:00
Mateusz Burzyński 39da6b1c63 Display property types in optional chains without optional type marker (#53804) 2023-06-23 13:04:08 -04:00
Mateusz Burzyński 70fe93fe33 Automatically enable debugMode when recording with Replay (#49027) 2023-06-22 11:19:32 -07:00
Mateusz Burzyński abf0ef8eef Fixed an issue with errors not being correctly reported after completion requests in nested calls (#54658) 2023-06-20 12:04:08 -07:00
Mateusz Burzyński b1c2e8caad Add extra test cases for string literal completions (#54714) 2023-06-20 09:52:38 -07:00
Mateusz Burzyński c565827b4f Fixed some string literal argument completions depending on resolved signature (#53996) 2023-06-13 09:34:19 -07:00
Mateusz Burzyński d95caa51fc Fixed a regression with string completions not being available directly in arguments typed using rest parameter (#54588) 2023-06-12 15:16:08 -07:00
Mateusz Burzyński 9d17b345b4 Revert collecting only outermost intra expression inference sites (#54613) 2023-06-12 10:09:07 -07:00
Mateusz Burzyński 9583850fa7 Deconflict values of CheckMode.RestBindingElement and CheckMode.TypeOnly (#54540) 2023-06-05 13:37:38 -07:00
Mateusz Burzyński 4749c38e47 Only collect outermost intra expression inference sites (#54186) 2023-06-05 12:40:11 -07:00
Mateusz Burzyński 2fb0267630 Treat this as a constant reference for purpose of narrowing using aliased expressions (#54347) 2023-06-01 16:44:53 -07:00
Mateusz Burzyński 2f626bff03 Elaborate errors on const asserted expressions (#54396) 2023-05-26 10:05:33 -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
Mateusz Burzyński 1561701b9f Allow to define valid static fields with names conflicting with builtin properties (#54198) 2023-05-22 16:44:24 -07:00
Mateusz Burzyński 074f20877d Fix JSX inference with excess properties (#53810) 2023-05-16 15:30:50 -07:00
Mateusz Burzyński d3513ee5c4 Improved go to type definition on type references of global container-like types using allowlist (#53729) 2023-05-15 13:40:18 -07:00
Mateusz Burzyński cb88998063 Evaluate simple template expressions (#53907) 2023-05-15 12:51:06 -07:00
Mateusz Burzyński a4009a335a Add extra tests for contextual typing of unannotated parameters with default initializers (#53940) 2023-05-09 11:58:16 -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
Mateusz Burzyński 2cbfb51ebb Fixed JSX attributes discriminating based on optional children (#53980) 2023-04-26 13:39:08 -07:00
Mateusz Burzyński 40787a7076 Improve contextual completions (#53554) 2023-04-20 09:22:14 -07:00
Mateusz Burzyński 8575886713 Remove duplicates from supportedTSExtensionsForExtractExtension (#53891) 2023-04-18 10:02:35 -07:00
Mateusz Burzyński e4f8c378c0 Add tests for importing types from .d.ts with explicit extension (#53890) 2023-04-18 08:37:07 -07:00
Mateusz Burzyński b269087505 Fixed an issue with JSX children expression not being contextually discriminated (#53502) 2023-04-17 12:42:25 -07:00
Mateusz Burzyński 5897d7a135 Report assignability errors on the satisfies keyword (#53797) 2023-04-16 15:52:10 -07:00
Mateusz Burzyński ae2b4afdcb Provide string completions within unions in indexed access types (#53225) 2023-03-29 10:07:34 -07:00
Mateusz Burzyński 089876a5c5 Retry string completions from the inferred type by default (#53481) 2023-03-27 18:21:03 -07:00
Mateusz Burzyński 218180ded2 Fixed an issue with an incorrect resolved signature being cached/returned sometimes for signatures depending on the contextual type/outer inference (#52146) 2023-03-23 12:15:33 -07:00
Mateusz Burzyński 3f90887a6e Optimize the transformed output of JSXSpreadAttributes containing an ObjectLiteralExpression (#49100) 2023-03-21 15:47:35 -07:00
Mateusz Burzyński abb4052f2f Always substitute indexed generic mapped type when getting constraint from indexed access (#53066) 2023-03-21 12:50:11 -07:00
Mateusz Burzyński f078ab0548 Avoid rewriting homomorphic mapped types with homomorphic instantiations (#53215) 2023-03-20 17:09:42 -07:00
Mateusz Burzyński acfb0b53d1 Make function properties context-sensitive based on their return statements (#50903) 2023-03-20 13:53:16 -07:00
Mateusz Burzyński 3fab5fff34 Fixed issues with inference from nested tuple types of the same shape (#49226) 2023-03-20 11:18:08 -07:00
Mateusz Burzyński 1ed06e6b05 Fixed an issue with not being able to use mapped type over union constraint as rest param (#49947) 2023-03-20 11:14:25 -07:00
Mateusz Burzyński 56aa3d522b Normalize generic tuple types with Simplifiable elements (#52385) 2023-03-20 11:10:31 -07:00
Mateusz Burzyński a5e6dee6b2 Do not infer to mapped types from implied index signatures created by rest bindings (#52632) 2023-03-20 11:06:26 -07:00
Mateusz Burzyński d458e30a06 Rewrite getPropFromRaw slightly to surface T in the parameters (#53301) 2023-03-19 20:01:16 -07:00
Mateusz Burzyński b8c71685f9 Add an extra test case related to return statements and annotated return types (#52628) 2023-03-16 14:58:03 -07:00
Mateusz Burzyński a6ba2e735d Collect contravariant-only inference candidates from shorter annotated functions (#52609) 2023-03-16 11:00:36 -07:00
Mateusz Burzyński 63495beb1a Fixed an issue with spreading a spreadable generic expression into generic JSX (#51580) 2023-03-15 14:57:37 -07:00