We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
String literal completions, empty string constraint, intellisense
Tested with v4.5.4
Playground
declare const foo1: (p: "" | "bar" | "baz") => void foo1("") // ^| // expected completions: "", "bar", "baz" // actual completions: "", "bar", "baz" declare const foo2: <P extends "" | "bar" | "baz">(p: P) => void foo2("") // ^| // expected completions: "", "bar", "baz" // actual completions: none
foo2 has no completions
foo2
foo2 should have same completions like foo1 which are "", "bar", "baz"
foo1
""
"bar"
"baz"
Bug Report
π Search Terms
String literal completions, empty string constraint, intellisense
π Version & Regression Information
Tested with v4.5.4
β― Playground Link
Playground
π» Code
π Actual behavior
foo2has no completionsπ Expected behavior
foo2should have same completions likefoo1which are"","bar","baz"