Skip to main content Link Search Menu Expand Document (external link)

Part overview

Added in v1.0.0


Table of contents


utils

AttributePart (interface)

Signature

export interface AttributePart {
  readonly _tag: "attribute"
  readonly name: string
  readonly value: string | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

BooleanPart (interface)

Signature

export interface BooleanPart {
  readonly _tag: "boolean"
  readonly name: string
  readonly value: boolean | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

ClassNamePart (interface)

Signature

export interface ClassNamePart {
  readonly _tag: "className"
  readonly value: ReadonlyArray<string>
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

CommentPart (interface)

Signature

export interface CommentPart {
  readonly _tag: "comment"
  readonly value: string | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

DataPart (interface)

Signature

export interface DataPart {
  readonly _tag: "data"
  readonly value: Readonly<Record<string, string | undefined>> | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

EventPart (interface)

Signature

export interface EventPart {
  readonly _tag: "event"
  readonly name: string
  readonly source: ElementSource<any>
  readonly value: null
  readonly index: number
  readonly onCause: (cause: Cause<unknown>) => Effect<unknown>
  readonly addEventListener: (handler: EventHandler<Event>) => void
}

Added in v1.0.0

NodePart (interface)

Signature

export interface NodePart {
  readonly _tag: "node"
  readonly value: unknown
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

Part (type alias)

Signature

export type Part =
  | AttributePart
  | BooleanPart
  | ClassNamePart
  | CommentPart
  | DataPart
  | EventPart
  | NodePart
  | PropertyPart
  | PropertiesPart
  | RefPart
  | TextPart

Added in v1.0.0

Parts (type alias)

Signature

export type Parts = ReadonlyArray<Part>

Added in v1.0.0

PropertiesPart (interface)

Signature

export interface PropertiesPart {
  readonly _tag: "properties"
  readonly value: Record<string, any> | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

PropertyPart (interface)

Signature

export interface PropertyPart {
  readonly _tag: "property"
  readonly name: string
  readonly value: unknown
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0

RefPart (interface)

Signature

export interface RefPart<T extends HTMLElement | SVGElement = HTMLElement | SVGElement> {
  readonly _tag: "ref"
  readonly value: ElementSource<T>
  readonly index: number
}

Added in v1.0.0

TextPart (interface)

Signature

export interface TextPart {
  readonly _tag: "text"
  readonly value: string | null | undefined
  readonly index: number

  readonly update: (value: this["value"], priority?: number) => Effect<void, never, Scope>
}

Added in v1.0.0