const a=<T extends '1'|'akv'|'ogb'|'222'>()=>{}
const b=a<''> // try the autocomplete here
🙁 Actual behavior
Autocomplete suggestions include all possible string values, ignoring the specific string literals in the constraint. This behavior diminishes the effectiveness of the autocompletion feature, as shown in the attached screenshot.
🙂 Expected behavior
Autocomplete should provide suggestions only for the specific string literals defined in the type constraint ('1', 'akv', 'ogb', '222') without additional unrelated strings.
🔎 Search Terms
generic autocomplete numeric string
🕗 Version & Regression Information
TypeScript Version: 5.6.3
⏯ Playground Link
https://www.typescriptlang.org/play/?exactOptionalPropertyTypes=false&ts=5.6.3#code/MYewdgzgLgBAhgXgDwBUYFMAeV1gCYQwDkAjEQD5FwDWAbhUSAOYBGDATJ0QHwAUAlAm4BvAL4AoUJFgsEcJER5A
💻 Code
🙁 Actual behavior
Autocomplete suggestions include all possible string values, ignoring the specific string literals in the constraint. This behavior diminishes the effectiveness of the autocompletion feature, as shown in the attached screenshot.
🙂 Expected behavior
Autocomplete should provide suggestions only for the specific string literals defined in the type constraint ('1', 'akv', 'ogb', '222') without additional unrelated strings.
Additional information about the issue
No response