hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

@luhring -- do you have any resources you'd recommend in order to appreciate benefits of TypeScript in more complex situations? I've generally just tried to minimally appease the type-checker, but I'm hoping to "do it right" and reap the rewards.

@luhring Not the real problem, but an example to illustrate: if I'm messing around with a 19x19 go game board grid, is there a way to make sure I don't accidentally create an 18x18 or 20x20 board via types? `BoardSpace[][]` just makes sure that I have an array of arrays of BoardSpaces.

Fixed-length arrays isn't something I need solved, but just an example of something I imagine type-checking could help with.

Dan Luhring

@dane Hey! It's been a while since I touched TypeScript, but I'd love to know the answer to this!