Skip to content
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

Replace type string with string literals. #1080

Closed
kanitw opened this issue Feb 7, 2016 · 3 comments
Closed

Replace type string with string literals. #1080

kanitw opened this issue Feb 7, 2016 · 3 comments
Labels
Blocked 🕐 For issues that are blocked by other issues
Milestone

Comments

@kanitw
Copy link
Member

kanitw commented Feb 7, 2016

Currently for most of Vega's string enums, we use string; as a type.
However, TS now supports string literals.

Therefore, we should go through our schema and replace string with string literals where applicable.

For example, Scale's type could become "linear" | "ordinal" | ... instead of string (Simply copy full list from Vega!)

@kanitw kanitw added this to the 1.x.x Patches & Minor Features milestone Feb 7, 2016
@domoritz
Copy link
Member

domoritz commented Feb 7, 2016

We should wait for ts to support microsoft/TypeScript#6554

Otherwise we cannot use variables.

@kanitw kanitw added the Blocked 🕐 For issues that are blocked by other issues label Feb 7, 2016
@kanitw
Copy link
Member Author

kanitw commented Jun 30, 2016

I'm not sure if we still wanna do this since we already use these enums in other dependent projects. Plus enum has the benefit of having autocomplete..

@kanitw
Copy link
Member Author

kanitw commented Jul 9, 2016

I'll close this. Please reopen if you have strong opinion about this.

@kanitw kanitw closed this as completed Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked 🕐 For issues that are blocked by other issues
Projects
None yet
Development

No branches or pull requests

3 participants