UNPKG

@action-land/component

Version:
28 lines (27 loc) 619 B
"use strict"; /** * Created by tushar on 08/08/18 */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Component interface. */ class Component { constructor(init, update, command, view) { this.init = init; this.update = update; this.command = command; this.view = view; } /** * @deprecated Use Component.lift() instead */ map(fn) { return this.lift(fn); } lift(fn) { return fn(this); } } exports.Component = Component; exports.COM = (init, update, command, view) => new Component(init, update, command, view);