Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Types

Validity

Validity: { invalid: boolean; error: MgError | null }

Type declaration

  • invalid: boolean
  • error: MgError | null

Evolve

Evolve: (store: Store, updatePointer: string | null, prevStore: Store | null) => Store

Type declaration

    • (store: Store, updatePointer: string | null, prevStore: Store | null): Store
    • Developer-supplied evolve function.
      In this function, derived data are calculated.

      Parameters

      • store: Store

        an store before evolve

      • updatePointer: string | null

        a common path of currently updated data

      • prevStore: Store | null

        an store before current update

      Returns Store

      evolved store

Render

Render: (store: Store) => VNode<{}> | View<UnmagicalState, UnmagicalActions>

Type declaration

    • (store: Store): VNode<{}> | View<UnmagicalState, UnmagicalActions>
    • Developer-supplied render function.
      Render function maps store to vdom.

      Parameters

      • store: Store

        current store

      Returns VNode<{}> | View<UnmagicalState, UnmagicalActions>

      VDOM

Update

Update: (...args: any[]) => Store | Promise<any>

Type declaration

    • (...args: any[]): Store | Promise<any>
    • Type of update function.

      Parameters

      • Rest ...args: any[]

        one or more arguments; The last parameter will be Store.

      Returns Store | Promise<any>

Entries

Const h

  • h<Attributes, ToAttributes>(nodeName: string | Component<Attributes, any, any, ToAttributes>, attributes?: Attributes, ...children: (Children | Children[])[]): VNode<ToAttributes> | View<any, any>

start

StartParameter

StartParameter: { data: Json; schema: Schema; render: Render; containerEl: Element; evolve?: Evolve; updates?: Record<string, Update>; rules?: Rules; catalog?: Record<string, string> }

Type declaration

  • data: Json
  • schema: Schema
  • render: Render
  • containerEl: Element
  • Optional evolve?: Evolve
  • Optional updates?: Record<string, Update>
  • Optional rules?: Rules
  • Optional catalog?: Record<string, string>

StartValue

StartValue: { onUpdate: UnmagicalAction<Event | { update: string; params: any[] }> }

Type declaration

  • onUpdate: UnmagicalAction<Event | { update: string; params: any[] }>

Const start

once

OnceParameter

OnceParameter: { data: Json; schema: Schema; evolve?: Evolve; rules?: Rules }

Type declaration

Const once

Generated using TypeDoc