News for hackers. Stuff that matters.
Re:TypeScript Features to Avoid by ragnese on Friday January 21, 2022 @10:53AM (#30025223)
Oh, good point. I forgot about var not getting mad at redeclaration. So the default TS implementation will merge an existing object with the newly defined fields. I'm too lazy to check, but I wonder what happens if MyType already exists and is a scalar, like a number...

I think I was still accidentally correct in saying that's what we'd write because who the hell actually WANTS the default behavior? :p

There are no comments on this comment yet.