4 ms·
Yeah the stuff I was doing was more to see how crazy of things we could do with the type system. Like I said just fun. But probably a waste of time other than t
by sethc2 7y ago
Yeah the stuff I was doing was more to see how crazy of things we could do with the type system. Like I said just fun. But probably a waste of time other than the learning. Just a warning that is tempting to do crazy (but stupid) things.
One kind of weird thing we did, was we had these JSON Schema definitions that were const, so all the strings like "type" were of a literal string type. Then using recursive type definitions, and the `extends` key word we were able to extract the actual shape of the data into a type.
Not exactly that useful, compared to typing it out, but it was still kind of cool.
- dfee 7y agoThis is interesting to me. How did you decide that you were over investing in types?