TechPostsFromX on Nostr: TypeScript's 'readonly' property kind of sucks. It's extremely easy to break - just ...
TypeScript's 'readonly' property kind of sucks.
It's extremely easy to break - just pass a readonly property to a function that expects a mutable one, and mutate it.
Fortunately, they're planning to fix this with a flag in the next version.
Source: x.com/mattpocockuk/status/1836478870301675670
Published at
2024-09-18 20:27:07Event JSON
{
"id": "06f7fa788dc946f0ab1b2f1e62459a09f3eb06536e0d5947b195a291cce76d18",
"pubkey": "52d119f46298a8f7b08183b96d4e7ab54d6df0853303ad4a3c3941020f286129",
"created_at": 1726691227,
"kind": 1,
"tags": [],
"content": "TypeScript's 'readonly' property kind of sucks.\n\nIt's extremely easy to break - just pass a readonly property to a function that expects a mutable one, and mutate it.\n\nFortunately, they're planning to fix this with a flag in the next version.\nhttps://image.nostr.build/e877b073be3781d9d35dc583fafeefc583fa0b301e683389a0652faaeb9a9617.png\n\nSource: x.com/mattpocockuk/status/1836478870301675670",
"sig": "2f0641cf01ac0d139a2914d2828cc92a16c2505c9b52426d731fc818a1d2d9bf74f5e910e8ac1f6c2840b7b673a24cb4b47763bef3215782e588692211f53dbe"
}