Understanding the default error type in v5.
I can throw anything, i.e.
Is this intentional? Maybe my configuration is wrong or I'm doing something wrong. The old unknown type avoided the problem by typing errors in the most generic way possible.
throw 5. I log the error and is indeed 5 with type number but the error type is annotated as Error | null. This can introduce runtime errors when narrowing the union and performing operations on the value such asIs this intentional? Maybe my configuration is wrong or I'm doing something wrong. The old unknown type avoided the problem by typing errors in the most generic way possible.