@coderbyheart on Twitter

A static archive of Markus Tacker's tweets. Follow me on Mastodon: @[email protected].

Home / Archive / 2021 / 2021-05 / 1397818733960310787

Hm, did @typescript 4 remove declaring
immutable objects?

I'm getting this error, however the playground code works: for

const foo = { a: "b" } as const

https://www.typescriptlang.org/play?ts=4.4.0-dev.20210526&strict=true#code/MYewdgzgLgBAZiEMC8MDeAoG2YEMBcMARAEZEYC+eEMokUQA
Embedded Photo

Thu, 27 May 2021 07:35:31 UTC