Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
amitport
· 3y ago · 0 comments
Structural typing is a thing.. also there aren't really classes in js in the Java sense, it's all prototype chains.
Comments
[–]
likeclockwork
3y 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.