@w5s/errorClassesReferenceErrorOn this pageReferenceError Alias to native globalThis.ReferenceError The ReferenceError object represents an error when a variable that doesn't exist (or hasn't yet been initialized) in the current scope is referenced.@exampleimport { ReferenceError } from '@w5s/error';try { throw new ReferenceError("Hello");} catch (e) { console.log(e instanceof ReferenceError); // true console.log(e.message); // "Hello" console.log(e.name); // "ReferenceError" console.log(e.stack); // Stack of the error}HierarchyErrorReferenceErrorIndex ConstructorsconstructorPropertiesnameConstructors externalconstructornew ReferenceError(message?: string): ReferenceErrornew ReferenceError(message?: string, options?: ErrorOptions): ReferenceErrorProperties namename: ReferenceError
Alias to native globalThis.ReferenceError
The ReferenceError object represents an error when a variable that doesn't exist (or hasn't yet been initialized) in the current scope is referenced.