Y
Hacker News
new
|
ask
|
show
|
jobs
by
amitport
1099 days ago
Structural typing is a thing.. also there aren't really classes in js in the Java sense, it's all prototype chains.
1 comments
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.
link