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
When a string literal type union also includes the general string type.
content assists stops working in VSCode (and the playground).
Code to reproduce the issue:
functiondefine(deps: depItemOrString[],Function){}typedepItemOrString=string|"ima/aba/bamba"|"winter/is/coming"|"there/can/be/only/one";// Intelli-sense for the string literals does **not** work here.define(["bamba"],()=>{})functiondefine2(deps: depItem[],Function){}typedepItem="ima/aba/bamba"|"winter/is/coming"|"there/can/be/only/one";// Everything works perfectly when the literal type union does not include a "general" string type.define2(["ima/aba/bamba"],()=>{})
The text was updated successfully, but these errors were encountered:
bd82
changed the title
AutoComplete for string literal types fails when the type union contains a generic "string"
AutoComplete for string literal types fails when the type union contains a generic <string>
Feb 25, 2019
Description:
When a string literal type union also includes the general string type.
content assists stops working in VSCode (and the playground).
Code to reproduce the issue:
Try this code in the Playground
Expected Behavior
I would expect that in both function (define and define2) auto-complete suggestion
would be provided based on the literal string union type.
Actual Behavior
The auto-complete suggestions are only provided for a "pure" string literal type.
Meaning one that does not include a "generic" string as well:
The text was updated successfully, but these errors were encountered: