UNPKG

jsx-view

Version:

Minimal JSX for HTML DOM tightly integrated with RxJS. TypeScript definitions, and attributes can be assigned to observables.

26 lines 909 B
import { BehaviorSubject } from "rxjs"; import { map } from "rxjs/operators"; /** For use as an embedded structure */ export class BehaviorJSX extends BehaviorSubject { } /** For use with $style attribute */ export class Behavior$Style extends BehaviorSubject { } /** For use with $class attribute */ export class Behavior$Class extends BehaviorSubject { } // /** Convenience map function implemented directly on the Observable class. */ // map<U>(fn: (from: T) => U): Observable<U> /** Make it easier to map from an observable value to a `$style` prop value */ export function map$Style(fn) { return map(fn); } /** Make it easier to map from an observable value to a `$class` prop value */ export function map$Class(fn) { return map(fn); } /** Make it easier to map from an observable value to a JSX.Child */ export function mapJSX(fn) { return map(fn); } //# sourceMappingURL=rxjs-helpers.js.map