Interface Standard<Component, Config>
interface Standard<
Component extends SvelteComponent = SvelteComponent,
Config extends
{
ContextOmit?: keyof NonNullable<Config["ContextShape"]>;
ContextShape?: { [key: string]: any };
PropsOmit?: keyof ComponentProps<Component>;
} = { ContextOmit: never; ContextShape: {}; PropsOmit: never },
> {
anchor?: Element;
class: new (
options: ComponentConstructorOptions<ComponentProps<Component>>,
) => Component;
context?: NarrowContextObject<Config>;
intro?: boolean;
props?: Partial<Omit<ComponentProps<Component>, Config["PropsOmit"]>>;
target?: Element | Document | ShadowRoot;
}
Component extends SvelteComponent = SvelteComponent,
Config extends
{
ContextOmit?: keyof NonNullable<Config["ContextShape"]>;
ContextShape?: { [key: string]: any };
PropsOmit?: keyof ComponentProps<Component>;
} = { ContextOmit: never; ContextShape: {}; PropsOmit: never },
> {
anchor?: Element;
class: new (
options: ComponentConstructorOptions<ComponentProps<Component>>,
) => Component;
context?: NarrowContextObject<Config>;
intro?: boolean;
props?: Partial<Omit<ComponentProps<Component>, Config["PropsOmit"]>>;
target?: Element | Document | ShadowRoot;
}
Type Parameters
- Component extends SvelteComponent = SvelteComponent
A specific component to narrow the allowed
class
andprops
. - Config extends {
ContextOmit?: keyof NonNullable<Config["ContextShape"]>;
ContextShape?: { [key: string]: any };
PropsOmit?: keyof ComponentProps<Component>;
} = { ContextOmit: never; ContextShape: {}; PropsOmit: never }Additional options to omit properties from allowed in
context
orprops
.
Properties
Optional
anchor
A child of target
to render the component immediately before.
class
The Svelte component class / constructor function.
Optional
context
The root-level additional data to add to the context passed to the component.
Optional
intro
intro?: boolean
If true, will play transitions on initial render, rather than waiting for subsequent state changes.
Optional
props
Props to pass to the component. You may define props as an object
.
Optional
target
The target to render component to. By default, document.body
is used as the target if not otherwise
defined.
Defines the TRL / client side configuration object to load a Svelte component that is suitable to use with TJSSvelte.API.Config.parseConfig.