3 ms·
Why null as any[]? Can’t it just be []?
by joegibbs 2y ago
Why null as any[]? Can’t it just be []?
- h_tbob 2y agoActually, if you do that you get: "Property 'email' does not exist on type 'never'.ts(2339)" When you do {{customer.email}}
- alpinisme 2y agoUse `[] as TheRealType`. `any` is the real wart on the language, not unknown, which adds safety by preventing you from doing anything dangerous with it.