Comment Comment by excepttheweasel Right, but in Typescript you can't match on the type at compile time, you have to add a "type" field with a string tag and match on it at runtime. parent excepttheweasel 7 years ago