ElementRef overview
Added in v1.0.0
Table of contents
utils
ElementRef (interface)
A reference to a rendered element.
Signature
export interface ElementRef<T extends Rendered = Rendered>
extends Versioned<never, never, T, never, Scope.Scope, T, NoSuchElementException, never> {
readonly [ElementRefTypeId]: RefSubject.RefSubject<Option.Option<T>>
readonly query: ElementSource<T>["query"]
readonly events: ElementSource<T>["events"]
readonly elements: ElementSource<T>["elements"]
readonly dispatchEvent: ElementSource<T>["dispatchEvent"]
}
Added in v1.0.0
ElementRefTypeId
Signature
export declare const ElementRefTypeId: typeof ElementRefTypeId
ElementRefTypeId (type alias)
Signature
export type ElementRefTypeId = typeof ElementRefTypeId
dispatchEvent
Signature
export declare function dispatchEvent<T extends Rendered>(ref: ElementRef<T>, event: Event)
Added in v1.0.0
isElementRef
Signature
export declare function isElementRef(value: unknown): value is ElementRef
make
Signature
export declare function make<T extends Rendered = Rendered>(): Effect.Effect<ElementRef<T>, never, Scope.Scope>
Added in v1.0.0
of
Signature
export declare function of<T extends Rendered>(rendered: T): Effect.Effect<ElementRef<T>, never, Scope.Scope>
Added in v1.0.0
set
Signature
export declare const set: {
<A extends Rendered>(value: A): (elementRef: ElementRef<A>) => Effect.Effect<A>
<A extends Rendered>(elementRef: ElementRef<A>, value: A): Effect.Effect<A>
}
Added in v1.0.0