Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by okeuro49

3 years ago

I've found the biggest difference is structural vs. nominal types.

https://www.typescriptlang.org/play#example/structural-typin...

It seems particularly suited to dealing with random JSON payloads.

1 comment

okeuro49

Reply

mirekrusin  3 years ago

Flow supports both nominal types for classes with correct variance and structural types for everything else. This is correct model for js, flow is ahead of typescript in this case.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities