DEV Community

Discussion on: 11 Tips That Make You a Better Typescript Programmer

Collapse
 
guillaumelagrange profile image
Guillaume Lagrange

Thanks for the article.

Very small typo in #9:
NamedCircle's name property should not be optional.

Collapse
 
ymc9 profile image
ymc9 ZenStack • Edited

Thanks, @guillaumelagrange . The "name" field is intentionally optional to demonstrate the effect of the satisfies keyword. The NamedCircle type gives a "looser" contract than inferred by the variable declaration.

Does it make sense, or maybe I missed something?

Some comments have been hidden by the post's author - find out more