lit-ui-router / TypedLitViewComponent
Type Alias: TypedLitViewComponent<T>
ts
type TypedLitViewComponent<T> =
| ((props) => void)
| ({
new (props): Pick<LitElement, keyof LitElement> & {
_uiViewProps?: UIViewInjectedProps<T>;
};
sticky?: boolean;
});Defined in: packages/lit-ui-router/src/interface.ts:438
A routed component as a TypedLitStateDeclaration checks it, without inferring the component's own return type.
- A template function returning
void, which accepts any renderable (as Lit'srender(): unknowndoes), so the template's body is never inferred. - A LitElement class, checked against LitElement's public members, so its protected
render()is never inferred.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends DefaultResolvesType | DefaultResolvesType |
Union Members
Function
ts
(props) => voidFunction
ts
{
new (props): Pick<LitElement, keyof LitElement> & {
_uiViewProps?: UIViewInjectedProps<T>;
};
sticky?: boolean;
}The router always passes props; classes may declare the parameter or not.
Parameters
| Parameter | Type |
|---|---|
props | UIViewInjectedProps<T> |
Returns
Pick<LitElement, keyof LitElement> & { _uiViewProps?: UIViewInjectedProps<T>; }
| Name | Type | Description | Defined in |
|---|---|---|---|
sticky? | boolean | If true, the same component instance is reused across state transitions | packages/lit-ui-router/src/interface.ts:454 |