[]previous and next page

SlotOwned

The record of a branch's owner that its accessors read: the value and whether it is being torn down.

The record of a branch's owner that its accessors read: the value and whether it is being torn down.

Import#

ts
import type { SlotOwned } from "@shadow-js/core/extend";

Signature#

ts
interface SlotOwned {
  /** The index of the branch this record belongs to (see {@link SlotChoice.index}). */
  index: number;
  /** The latest condition value while the branch is shown; what its accessor returns during teardown. */
  value: unknown;
  /** True while the branch is torn down: its accessor then returns `value` instead of throwing. */
  disposing: boolean;
}

Members#

Name Type Description
index index: number The index of the branch this record belongs to (see SlotChoice.index).
value value: unknown The latest condition value while the branch is shown; what its accessor returns during teardown.
disposing disposing: boolean True while the branch is torn down: its accessor then returns value instead of throwing.