TypeTags .WebAssemblyLinkError
Overview
The WebAssembly.LinkError
object indicates an error during module instantiation (besides traps from the start function).
️🚫
Since error objects do not have unique type tags, a
WebAssembly.LinkError
type tag is the same as any other Error
object. If
you need to check if an error is an instance of a WebAssembly.LinkError
, use
instanceof
instead.
Usage
import { TypeTags } from 'typetags'
try { throw new WebAssembly.LinkError('Hello', 'someFile', 10)} catch (e) { console.log(e instanceof LinkError) // true console.log(TypeTags.get(e)) // → [object Error]}
console.log(TypeTags.WebAssemblyLinkError)// → [object Error]
Metadata (TType)
Metadata | Value |
---|---|
.type | WebAssembly.LinkError |
.tag | [object Error] |
.builtin() | undefined |
.getTag() | [object Error] |
.hasSpecialArgs() | false |
.instance() | undefined |
.instanceTypeOf() | object |
.info() | see more |
.isAvailable() | true |
.isConstructor() | true |
.isFactory() | true |
.isFunction() | true |
.isGlobal() | false |
.isIterator() | false |
.isNested() | true |
.isObject() | false |
.isPrimitive() | false |
.isStringifiable() | true |
.isSyntatic() | false |
.isTypedArray() | false |
.ownKeys() | [length, name, prototype] |
.toString() | function toString() { [native code] } |
.typeOf() | function |
Signature
declare type ITypeTags = { [key in Types | NestedTypes]: Tags}
declare interface Predicate { predicate(value: any): boolean}