function / @typed/template/WebComponent

register

Registers in CurrentRenderDocument’s registry and captures the layer’s services. Provides no services; use the custom element through ordinary HTML templates. The layer’s Scope owns every connected instance. Closing it stops rendering and deactivates this class; browsers cannot unregister a custom element. Disconnect interrupts subscriptions/listeners; reconnect waits for cleanup before starting a fresh view. Failures dispatch typed:error with a Cause in CustomEvent.detail. Native template event handlers work without an adapter. Shadow roots retain slotted light children. Light mode owns all host children.

Package version
1.0.0-beta.13
Category
Web Components
Since
1.0.0

Import

import { register } from "@typed/template/WebComponent";

Signatures

export declare function register<F extends Fields, View extends Renderable.Any>(definition: Definition<F, View>): Layer.Layer<never, RegistrationError, Exclude<Exclude<Renderable.Services<View>, RenderTemplate>, Scope.Scope>>;

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source