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
Member of
WebComponent

Import

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

Access WebComponent.register through the imported WebComponent export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

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