Skip to main content

Class: MissingPartError<T>

Defined in: packages/core/src/errors/MissingPartError.ts:16

Thrown when one or more of a driver's declared ScenePart parts are not found to exist — e.g. enforcePartExistence guards a method that requires an optional part to be present before acting on it. Existence means presence in the DOM, regardless of visibility.

Carries the offending missingPartName (a single part name or, for a multi-part check, the array of every name that was missing) alongside the ADR-010 serializable driverName snapshot inherited from ErrorBase.

Extends​

Type Parameters​

T​

T extends ScenePart

Constructors​

Constructor​

new MissingPartError<T>(missingPartName, driver): MissingPartError<T>

Defined in: packages/core/src/errors/MissingPartError.ts:17

Parameters​

missingPartName​

keyof T | readonly keyof T[]

driver​
driverName​

string

Returns​

MissingPartError<T>

Overrides​

ErrorBase.constructor

Properties​

missingPartName​

readonly missingPartName: keyof T | readonly keyof T[]

Defined in: packages/core/src/errors/MissingPartError.ts:18

Inherited members (6)

Properties​

cause?​

optional cause?: unknown

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from​

ErrorBase.cause


driverName​

readonly driverName: string

Defined in: packages/core/src/errors/ErrorBase.ts:13

Inherited from​

ErrorBase.driverName


message​

message: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

ErrorBase.message


name​

name: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from​

ErrorBase.name


stack?​

optional stack?: string

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

ErrorBase.stack

Methods​

isError()​

static isError(error): error is Error

Defined in: docs/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​
error​

unknown

Returns​

error is Error

Inherited from​

ErrorBase.isError