Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

micro-observables

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-observables - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

2

lib/hooks.d.ts
import { Observable } from "./observable";
export declare function useObservable<T>(observable: Observable<T>): T;
export declare function useComputedObservable<T>(compute: () => Observable<T>, deps: any[]): T;
export declare function useComputedObservable<T>(compute: () => Observable<T>, deps?: any[]): T;

@@ -13,4 +13,5 @@ "use strict";

function useComputedObservable(compute, deps) {
if (deps === void 0) { deps = []; }
return useObservable(react_1.useMemo(compute, deps));
}
exports.useComputedObservable = useComputedObservable;

@@ -12,11 +12,11 @@ export declare type Listener<T> = (val: T, prevVal: T) => void;

onlyIf(predicate: (val: T) => boolean): Observable<T | undefined>;
static compute<U>(inputObservables: [], transform: () => U): Observable<U>;
static compute<T1, U>(inputObservables: [Observable<T1>], transform: (val1: T1) => U): Observable<U>;
static compute<T1, T2, U>(inputObservables: [Observable<T1>, Observable<T2>], transform: (val1: T1, val2: T2) => U): Observable<U>;
static compute<T1, T2, T3, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>], transform: (val1: T1, val2: T2, val3: T3) => U): Observable<U>;
static compute<T1, T2, T3, T4, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>], transform: (val1: T1, val2: T2, val3: T3, val4: T4) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, T7, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>, Observable<T7>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6, val7: T7) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, T7, T8, U>(inputObservables: [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>, Observable<T7>, Observable<T8>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6, val7: T7, val8: T8) => U): Observable<U>;
static compute<U>(inputObservables: readonly [], transform: () => U): Observable<U>;
static compute<T1, U>(inputObservables: readonly [Observable<T1>], transform: (val1: T1) => U): Observable<U>;
static compute<T1, T2, U>(inputObservables: readonly [Observable<T1>, Observable<T2>], transform: (val1: T1, val2: T2) => U): Observable<U>;
static compute<T1, T2, T3, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>], transform: (val1: T1, val2: T2, val3: T3) => U): Observable<U>;
static compute<T1, T2, T3, T4, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>], transform: (val1: T1, val2: T2, val3: T3, val4: T4) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, T7, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>, Observable<T7>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6, val7: T7) => U): Observable<U>;
static compute<T1, T2, T3, T4, T5, T6, T7, T8, U>(inputObservables: readonly [Observable<T1>, Observable<T2>, Observable<T3>, Observable<T4>, Observable<T5>, Observable<T6>, Observable<T7>, Observable<T8>], transform: (val1: T1, val2: T2, val3: T3, val4: T4, val5: T5, val6: T6, val7: T7, val8: T8) => U): Observable<U>;
}

@@ -23,0 +23,0 @@ export declare class WritableObservable<T> extends Observable<T> {

{
"name": "micro-observables",
"version": "1.3.2",
"version": "1.3.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc