interface / @typed/template

WebComponent.Definition

An inert definition shared by browser registration and server rendering. Schemas supply optionality and defaults. Inputs are parent-owned; local writable state can be created in an Effect returned by render.

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.Definition 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 interface Definition<F extends Fields, View extends Renderable.Any> {
    readonly name: string;
    readonly stopPropagation?: RootEventOptions;
    readonly attributes?: F;
    readonly render: (props: RenderProps<F>) => View;
}

Property: attributes

Synchronous schema fields. Use .name for a DOM property instead of an attribute.

Other public imports

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

Source