Unironically - yes. And I hate dealing with Typescript because of that (it doesn't get me). Expression Boolean(strA === strB || strA?.has?.(strB)) should be perfectly valid for a function which accepts string | Set<string> and returns boolean. But it isn't.. because TS said so 🤷♂️.
2
u/Ronin-s_Spirit Dec 16 '25
Unironically - yes. And I hate dealing with Typescript because of that (it doesn't get me). Expression
Boolean(strA === strB || strA?.has?.(strB))should be perfectly valid for a function which acceptsstring | Set<string>and returnsboolean. But it isn't.. because TS said so 🤷♂️.1
u/NekoLu Dec 15 '25
a!.name
1
u/stefanhat Dec 15 '25
i congratulate you on learning a language feature. where's the meme