Skip to content

wirestate-lit

Commands

NameDescription
OnCommandControllerReactive controller that registers a command handler.
OnCommandDecoratorRepresents type returned by onCommand.
UseOnCommandOptionsRepresents options for useOnCommand.
onCommandDecorator for Lit element methods that handle a specific command.
useOnCommandRegisters a command handler for the host element's lifetime.

Consumption

NameDescription
InjectionDecoratorRepresents type returned by injection.
InjectionOptionsRepresents options for injection.
OptionalInjectionDecoratorRepresents type returned by optionalInjection.
OptionalInjectionOptionsRepresents options for optionalInjection.
UseContainerValueRepresents value returned by useContainer.
UseInjectionOptionsRepresents options for useInjection.
UseInjectionValueRepresents value returned by useInjection.
UseOptionalInjectionOptionsRepresents options for useOptionalInjection.
UseOptionalInjectionValueRepresents value returned by useOptionalInjection.
OptionalInjectionFallbackProvides a fallback value when an optional injection is not bound.
UseScopeValueRepresents value returned by useScope.
injectionInjects a container value into a Lit element property.
optionalInjectionInjects a container value if it exists.
useContainerConsumes the active container from the nearest Lit context.
useInjectionConsumes a service from the nearest Lit container context.
useOptionalInjectionConsumes a service if the nearest container has it.
useScopeConsumes a WireScope from the nearest Lit container context.

Context

VariableDescription
ContainerContextLit context object for providing and consuming the container.

Events

NameDescription
OnEventControllerReactive controller that subscribes to container events.
OnEventDecoratorRepresents type returned by onEvent.
UseOnEventsOptionsRepresents options for useOnEvents.
onEventDecorator for Lit element methods that handle events from the event bus.
useOnEventsSubscribes to events for the host element's lifetime.

Provision

NameDescription
ContainerProviderReactive controller that provides a root container through Lit context.
SubContainerProviderReactive controller that provides a managed child container.
ContainerProviderDecoratorRepresents the type returned by containerProvide.
ContainerProviderOptionsRepresents options for ContainerProvider.
SubContainerProviderDecoratorRepresents type returned by subContainerProvide.
SubContainerProviderOptionsRepresents options for SubContainerProvider.
UseContainerProvisionOptionsRepresents options for useContainerProvision.
containerProvideDecorator that provides an IoC container to child components.
subContainerProvideDecorator that provides a managed child container derived from the nearest parent container context.
useContainerProvisionHook that provides a container to the host element and its children.
useSubContainerProviderHook that provides a managed child container for the host element's lifetime.

Queries

NameDescription
OnQueryControllerReactive controller that registers a query handler.
OnQueryDecoratorRepresents type returned by onQuery.
UseOnQueryOptionsRepresents options for useOnQuery.
onQueryDecorator for Lit element methods that handle a specific query.
useOnQueryRegisters a query handler for the host element's lifetime.