uralsjs-app-abstractions
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

uralsjs-app-abstractions

App multiplatform abstraction

API

/**
 * Function renders html by model and id
 */
export type Widget<Model> = (m: Model, id: string) => string;

/**
 * Set of one model data for app
 */
export type ModelSet<M, Id> = {
    widget: Widget<M>,
    idTool: IdTool<number|string>,
    rootSelector: (el: Rec<M, Id>) => string,
    initData: M[],
    stor: ReactiveStorage<M, Id>
}

/**
 * Function regrouping models by group function
 */
export function regroup<M>(
    arr: M[], 
    defSelector: (m: M) => string
): Record<string, M[]> {...}

Readme

Keywords

none

Package Sidebar

Install

npm i uralsjs-app-abstractions

Weekly Downloads

1

Version

0.1.4

License

MIT

Unpacked Size

7.59 kB

Total Files

10

Last publish

Collaborators

  • pantagruel74