Matt Pocock @mattpocock.com · Apr 8

Spotted in the wild today: a Mutable<T> type. Does the opposite of Readonly<T>. Weird that TS doesn't have this built-in.

50 likes 3 replies

?

Replies

如月飛羽🎀🌙🏳️‍⚧️🌈 · Apr 8

Another case where it's really unfortunate TypeScript no longer wants to add any new built-in type utilities. (The other case I'm thinking of is ValueOf<T>.) At least type-fest exists, I guess.

Ashley Claymore · Apr 8

It's much safer to take something that is mutable and say that's it's readonly, than it is to take something that is readonly and say that it's mutable

@oljimenez.bsky.social · Apr 8

It's a cool type, but i don't see a use case for that type 😅