optional chaining would make TS stop giving me errors. But it does not. What would be to correct way to go about this for id may or may not exist. I am thinking of making it an optional property, but not sure.
Just make the property optional
Обсуждают сегодня