2 ms·
I don't think it is possible in Typescript, but in other languages you can do assertations about custom types. Like assert istype(whatever, MyCustomType) Whic
by roflyear 4y ago
I don't think it is possible in Typescript, but in other languages you can do assertations about custom types. Like
assert istype(whatever, MyCustomType)
Which would throw an exception if whatever is not a "MyCustomType" at runtime.