StaticScript
StaticScript copied to clipboard
Any plan to support union type?
Or any idea?
I have some attempts in this, but I have some problems. (about type guard)
Hey!
Maybe I didn't understand question:
I will store Object as plain structures when this will be possible and as V8::Value
Related typechecking, this will be on frontend side (typescript as framework)
But, I only started, I need sometime to start implementing it :)
Thanks
Sorry, maybe I didn’t make it clear.
for example:
interface Foo {
a: string
b: string
}
interface Bar {
b: string
c: string
}
type Baz = Foo | Bar
declare const a: Baz
a.b = "" // here
if union type is implemented as a plain struct
where is the b field? (if you do not use the v8::object)