News for hackers. Stuff that matters.
Re:The TypeScript Tax by rcfox on Friday January 25, 2019 @05:30PM (#19003217)
`const testVar = {}` doesn't mean that the object is immutable, it means that testVar will never point to something else.
Re:The TypeScript Tax by AgentME on Friday January 25, 2019 @05:34PM (#19003260)
He's not saying that TypeScript complains because he thinks TypeScript considers testVar immutable here. TypeScript will complain because it will infer the type of testVar is an object with no properties, and `testVar.asdf = "asdf";` is an attempt to write to a nonexistent property.