Props overview
Added in v1.0.0
Table of contents
utils
AttrsOf (type alias)
Signature
export type AttrsOf<Props extends Record<string, any>> = {
readonly [K in keyof Props]?: Props[K] | Placeholder.Any<Props[K]>
}
Added in v1.0.0
BooleanAttrsOf (type alias)
Signature
export type BooleanAttrsOf<Attrs extends Record<string, any>> = {
readonly [K in keyof Attrs as K extends string ? (boolean extends Attrs[K] ? `?${K}` : never) : never]?:
| Attrs[K]
| Placeholder.Any<Attrs[K]>
}
Added in v1.0.0
DataProps (type alias)
Signature
export type DataProps = {
readonly data?: Record.ReadonlyRecord<any, any> | Placeholder.Any<Record.ReadonlyRecord<any, any>> | undefined
}
Added in v1.0.0
EventsOf (type alias)
Signature
export type EventsOf<El, EventMap extends {} = DefaultEventMap<El>> = {
readonly [K in keyof EventMap as K extends string ? `on${Capitalize<K>}` : never]?:
| EventHandler.EventHandler<EventWithCurrentTarget<El, Extract<EventMap[K], Event>>, any, any>
| Effect.Effect<unknown, any, any>
| null
| undefined
}
Added in v1.0.0
PropsOf (type alias)
Signature
export type PropsOf<Attrs extends Record<string, any>> = {
readonly [K in keyof Attrs as K extends string ? `.${K}` : never]?: Attrs[K] | Placeholder.Any<Attrs[K]>
}
Added in v1.0.0
RefOf (type alias)
Signature
export type RefOf<T extends Rendered> = {
readonly ref?: ElementRef<T> | undefined
}
Added in v1.0.0
TypedPropertiesMap (type alias)
Signature
export type TypedPropertiesMap = {
readonly [K in keyof HTMLPropertiesMap]: K extends keyof HTMLElementTagNameMap
? TypedProps<HTMLPropertiesMap[K], HTMLElementTagNameMap[K]>
: TypedProps<HTMLPropertiesMap[K], HTMLElement>
}
Added in v1.0.0
TypedProps (type alias)
Signature
export type TypedProps<Input extends Record<string, any>, Element extends Rendered> = [
AttrsOf<Input> & BooleanAttrsOf<Input> & PropsOf<Input> & EventsOf<Element> & RefOf<Element> & DataProps
] extends [infer R]
? { readonly [K in keyof R]: R[K] }
: never
Added in v1.0.0
getEventHandler
Signature
export declare function getEventHandler<R, E, Ev extends Event = Event>(
handler: EventHandler.EventHandler<Ev, E, R> | Effect.Effect<unknown, E, R> | null | undefined
): EventHandler.EventHandler<Ev, E, R> | null
Added in v1.0.0