Skip to content

String Union Autocomplete Support #6705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
basarat opened this issue Jan 28, 2016 · 4 comments
Closed

String Union Autocomplete Support #6705

basarat opened this issue Jan 28, 2016 · 4 comments
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Milestone

Comments

@basarat
Copy link
Contributor

basarat commented Jan 28, 2016

Something along:

type Foo = "aReallyLong" | "bReallyLong";
let foo:Foo;
foo = "aReally // Here 

Similar to #5602 🌹 (also requested here #3192 (comment))

@olmobrutall
Copy link

👍
...not sure it the autocomplete should be triggered on = or " however.

@mhegazy mhegazy added Suggestion An idea for TypeScript Help Wanted You can do this labels Jan 28, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 28, 2016

+1. PRs welcomed

@RyanCavanaugh RyanCavanaugh added this to the Community milestone Jan 29, 2016
@Ciantic
Copy link

Ciantic commented Jul 18, 2016

Is equality autocompletion possiblity too? E.g. foo === "aReally here.

P.S. in equality comparsion it would be nice to have error checking when using bare string, like

foo === "not" would be flagged as error since foo can be demonstrated to never have this "not"

@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@basarat
Copy link
Contributor Author

basarat commented Feb 20, 2020

Its been supported for a while:

image

Thanks TS Folks 🌹 ❤️

@basarat basarat closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants