@w5s/errorClassesTypeErrorOn this pageTypeError Alias to native globalThis.TypeError@exampleimport { TypeError } from '@w5s/error';try { throw new TypeError("Hello");} catch (e) { console.log(e instanceof TypeError); // true console.log(e.message); // "Hello" console.log(e.name); // "TypeError" console.log(e.stack); // Stack of the error}HierarchyErrorTypeErrorIndex ConstructorsconstructorPropertiesnameConstructors externalconstructornew TypeError(message?: string): TypeErrornew TypeError(message?: string, options?: ErrorOptions): TypeErrorProperties namename: TypeError
Alias to native globalThis.TypeError