You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario 1: Code completion stopped working by adding an undefined as the default value for the generic type. TypeScript narrows down the range of expected argument types, and as a result, the code completion doesn't work correctly. It works fine in Typescript 5.0 or below.
Scenario 2: Code completion stopped when using an overloaded function type that combines union types with named tuples containing a generic type parameter. it works fine in Typescript 5.0 or below.
🔎 Search Terms
Code completion issues in typescript 5.1
🕗 Version & Regression Information
The Issue started occurring on typescript 5.1 and beyond. It works fine in versions 5.0 or below.
declarefunctionfunc<constTextends'a'|'b'|undefined=undefined,>(arg?: T): string;// Code completion does not workfunc('')
Scenario 2:
interfaceFunc{<Keyextends'a'|'b'>(
...args:
|[key: Key,options?: any]|[key: Key,defaultValue: string,options?: any]): string;}declareconstfunc: Func;// Code completion does not workfunc('');
🙁 Actual behavior
Code completion doesn't work
🙂 Expected behavior
Code completion should work as in the images below:
The text was updated successfully, but these errors were encountered:
pedrodurek
changed the title
Code completion stopped working for a few scenarios after typescript 5.1
Code completion stopped working for a few scenarios in typescript 5.1
Jun 19, 2023
Bug Report
Scenario 1: Code completion stopped working by adding an
undefined
as the default value for the generic type. TypeScript narrows down the range of expected argument types, and as a result, the code completion doesn't work correctly. It works fine in Typescript 5.0 or below.Scenario 2: Code completion stopped when using an overloaded function type that combines union types with named tuples containing a generic type parameter. it works fine in Typescript 5.0 or below.
🔎 Search Terms
Code completion issues in typescript 5.1
🕗 Version & Regression Information
The Issue started occurring on typescript 5.1 and beyond. It works fine in versions 5.0 or below.
⏯ Playground Link
Scenario 1: https://tsplay.dev/w1xZGW
Scenario 2: https://tsplay.dev/WKvGZm
💻 Code
Scenario 1:
Scenario 2:
🙁 Actual behavior
Code completion doesn't work
🙂 Expected behavior
Code completion should work as in the images below:
The text was updated successfully, but these errors were encountered: