13
Announcing TypeScript 5.6 Beta (devblogs.microsoft.com)
submitted 10 months ago by [email protected] to c/[email protected]
top 4 comments
sorted by: hot top new old
[-] [email protected] 1 points 10 months ago

Did they get 'truthy' from The Colbert Report?

[-] [email protected] 6 points 10 months ago

Truthy/falsey refers to how types are converted to booleans.
So an empty string is falsey. It's not false, but when compared as a Boolean it converts to false.
A 0 is falsey, any other number is truthy.

[-] [email protected] 3 points 10 months ago* (last edited 10 months ago)

One pet peeve of mine is testing libraries having toBeTruthy/toBeFalsy matchers, but not toBeTrue and toBeFalse. I get that the latter are no shorter than toBe(true), but if the former are listed in the docs, then people who don't know the terminology will use those - I've seen (past) coworkers do that.

[-] [email protected] 1 points 10 months ago

Finally we have the Iterator Helper Methods!

this post was submitted on 26 Jul 2024
13 points (93.3% liked)

TypeScript

975 readers
1 users here now

founded 2 years ago
MODERATORS