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

Remove TODOs in model #95

Open
weswigham opened this issue Mar 28, 2017 · 0 comments
Open

Remove TODOs in model #95

weswigham opened this issue Mar 28, 2017 · 0 comments

Comments

@weswigham
Copy link
Contributor

This tracks a collection of in-code TODOs around here. Given the vega-lite API,
hours, for example, could be typed as 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23, rather than number and be much more accurate, in terms of what is allowable. unfortunately, TS doesn't (yet) guard on less than/greater than, so this could be super cumbersome for API consumers (if they have a function which takes a number, after they've verified its range themselves, they'd need to cast to this union or a member of it). Obviously, then milliseconds is even longer.

Y'know, the more I write the more I realize with current limitations, this is a bad idea. This issue now tracks removing those TODOs from the code - until TS supports numeric range types and guards for them, specifying allowed numbers like this is just too cumbersome for API definers and consumers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant