jsx-view
Version:
Minimal JSX for HTML DOM tightly integrated with RxJS. TypeScript definitions, and attributes can be assigned to observables.
22 lines • 1.26 kB
TypeScript
import type { Observable, OperatorFunction, UnaryFunction } from "rxjs";
import { BehaviorSubject } from "rxjs";
/** For use as an embedded structure */
export declare class BehaviorJSX extends BehaviorSubject<JSX.Child> {
}
/** For use with $style attribute */
export declare class Behavior$Style extends BehaviorSubject<Partial<CSSStyleDeclaration>> {
}
/** For use with $class attribute */
export declare class Behavior$Class extends BehaviorSubject<string | string[] | Record<string, any> | undefined | null | false> {
}
/** Make it easier to map from an observable value to a `$style` prop value */
export declare function map$Style<T>(fn: (from: T) => Partial<CSSStyleDeclaration>): OperatorFunction<T, Partial<CSSStyleDeclaration>>;
/** Make it easier to map from an observable value to a `$class` prop value */
export declare function map$Class<T>(fn: (from: T) => {
[className: string]: boolean;
} | string | undefined | null | false): OperatorFunction<T, {
[className: string]: boolean;
} | string | undefined | null | false>;
/** Make it easier to map from an observable value to a JSX.Child */
export declare function mapJSX<T>(fn: (from: T) => JSX.Child): UnaryFunction<Observable<T>, JSX.Child>;
//# sourceMappingURL=rxjs-helpers.d.ts.map