Nican on Nostr: Joys of TypeScript refactoring: I removed `orders` from `A`, thinking it was no ...
Joys of TypeScript refactoring:
I removed `orders` from `A`, thinking it was no longer necessary.
But TypeScript found that type `B` is still compatible, since `orders` is optional.
So the compiler did not give any errors about it being missing.
Published at
2023-10-28 20:48:44Event JSON
{
"id": "cb66f99ce749b4b97dc68281ed66d089c0acc8cbcc7752fae14713d7537654b0",
"pubkey": "376a3864d7fde31572b0cf4f41e09917e7a6471145a0d4d0bedda7a76bbeae54",
"created_at": 1698526124,
"kind": 1,
"tags": [
[
"proxy",
"https://furry.engineer/users/nican/statuses/111314608067257098",
"activitypub"
]
],
"content": "Joys of TypeScript refactoring: \n\nI removed `orders` from `A`, thinking it was no longer necessary. \n\nBut TypeScript found that type `B` is still compatible, since `orders` is optional. \n\nSo the compiler did not give any errors about it being missing.\n\nhttps://cdn.pawb.social/mastodon-fe/media_attachments/files/111/314/586/661/017/212/original/d345451920df6299.png",
"sig": "6ec4d292ce6f1df505e82f8765c14d428d0742f1b0d5cd2b20d08ebcd5d47f600f3f23d9ed81640fb18a07ad6f52c63910fbc69974af6cf66cf58cc0019de0fb"
}