Vedant Roy
Vedant Roy
Note: I think the right thing to do is to eventually create a separate CLI tool that uses the Typescript compiler API and generates all the validation functions into a...
`registerType` originally existed b/c I wanted to support multifile types. I thought I would "register" types into a global namespace that could be shared across files. It takes a string...
> Hm, I don't know about the scope issues. I would suggest sticking to the javascript scope rules. That would probably be more intutive. You can always declare global types...
I'm just finished a big refactor that will allow me to implement type intersection + other features. Quick question: With the types you are intersecting, are they both in the...
So the reason I asked about the types being in different files was because I just realized I can't validate multi-file types (Foo imports Bar from another file) using just...
The fundamental issue is that Babel processes files one at a time. So I cannot wait until all files have been processed to build a global "namespace" of types. The...
@schontz Intersection is supported. `extends` is not supported, but I don't think it would be too bad to support it. Let me know if "extends" support is important!
Hmm, right now no. I'll take a shot at implementing this -- it seems like the extends algorithm is simpler than intersection anyway. In the meantime, intersection is a pretty...
Yes, that should work.
I believe intersection can cover everything `extends` does. The above example would become: ``` interface Foo { data : E } type Bar = Foo ``` There's no intersection involved...