Closed timoxley closed 9 years ago
I think you're confusing types with values. If you where to define the boolean type with union-type it would look like this:
var Boolean = Type({True: [], False: []});
Here Boolean
is the type and True
and False
are values. So what you're asking is really to define a value without it belonging to a type.
What benefits do you think this would offer? Maybe a shortcut for defining a type with only a single possible value would be better?
hm, I don't know what I'm asking anymore, nvm. :+1:
No problem!
Would be good if one could define types without requiring nesting inside an object: