#type-system

Found 2 articles tagged with #type-system

How to Mimic Nominal Typing in TypeScript

You can overcome drawbacks of structural typing in TypeScript by creating nominal types with a little bit of extra code.

TypeScript Structural Typing

If the type is shaped like a duck, it is a duck. If a goose has all the same attributes as a duck, then it also is a duck.