On this pageTypeError Alias to native globalThis.TypeError The TypeError object represents an error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.@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): TypeErrornew TypeError(message, options): TypeErrorProperties namename: TypeError
Alias to native globalThis.TypeError
The TypeError object represents an error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.