6 Comments
May 8Liked by Maina Wycliffe

Omitted word:

> Typescript will make you jump through *??hoops??* to accept the variable,

Expand full comment
author

Thanks, you mean like jump through multiple hoops, as the proper sentence?

Expand full comment
Feb 26Liked by Maina Wycliffe

Great writeup!

Expand full comment
author

Thank you

Expand full comment

Completely useless and stupid article. You could literally skip the satisfies keyword altogether in these examples and it would work exactly the same.

Expand full comment
author

I guess you are missing the point, satisfies key word adds type checking to your declarations without having the same side effect as Type Annotation or Assertion where the variable becomes that type (which you might need to narrow later on), leaving it in the narrow type which it was defined as. Yes, the examples would still work without it, but nothing prevents you from making a mistake without satisfies (or alternatives which might have undesirable characteristics as discussed in the useless article), It's up to you whether you want to use the satisfies operator or not, but it's important to understand how exactly to use it.

Expand full comment