Use type annotation instead of type assertion
This causes TS to check assignability rather than casting the type, which can catch additional mistakes, such as mis-naming an optional property.
Showing
Please register or sign in to comment