Hacker News new | ask | show | jobs
by likeclockwork 1099 days ago
instanceof only works for inherited types, usually expressed with the class keyword by TypeScript users. It's entirely worthless if you're not using them. Class is the only construct in TS that is both a type and a value.