🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

callbag-state

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callbag-state - npm Package Compare versions

Comparing version

to
0.1.2

2

dist/es5/index.d.ts
export { makeState } from './state';
export { trace, change, postTrace } from './trace';
export { Change, ChangeTrace, ChangeTraceLeaf, ChangeTraceNode, isLeaf, Downstream, Upstream, State, isState } from './types';
export declare function state<T>(t: T | undefined): import("./types").State<T>;
export declare function state<T>(t: T): import("./types").State<T>;
export default state;

@@ -1,2 +0,3 @@

import { State, Downstream, Upstream } from './types';
export declare function makeState<T>(initial: T | undefined, downstream: Downstream<T>, upstream: Upstream<T>): State<T>;
import { State, Downstream, Upstream, SubState } from './types';
export declare function makeState<T>(initial: T, downstream: Downstream<T>, upstream: Upstream<T>): State<T>;
export declare function makeState<T, K extends keyof T>(initial: T[K] | undefined, downstream: Downstream<T[K] | undefined>, upstream: Upstream<T[K]>): SubState<T, K>;

@@ -22,4 +22,12 @@ import { Source, Sink, START, DATA, END, Callbag } from 'callbag';

export declare type MsgType = START | DATA | END;
export declare type State<T> = Source<T | undefined> & Sink<T> & {
get(): T | undefined;
export declare type SubState<T, K extends keyof T> = Source<T[K] | undefined> & Sink<T[K]> & {
get(): T[K] | undefined;
set(t: T[K]): void;
clear(): void;
downstream(): Downstream<T[K] | undefined>;
upstream(): Upstream<T[K]>;
sub<K2 extends keyof T[K]>(key: K2): SubState<T[K], K2>;
};
export declare type State<T> = Source<T> & Sink<T> & {
get(): T;
set(t: T): void;

@@ -29,3 +37,3 @@ clear(): void;

upstream(): Upstream<T>;
sub<K extends keyof T>(key: K): State<T[K]>;
sub<K extends keyof T>(key: K): SubState<T, K>;
};

@@ -32,0 +40,0 @@ export declare function isState<T>(cb: Callbag<any, T>): cb is State<T>;

export { makeState } from './state';
export { trace, change, postTrace } from './trace';
export { Change, ChangeTrace, ChangeTraceLeaf, ChangeTraceNode, isLeaf, Downstream, Upstream, State, isState } from './types';
export declare function state<T>(t: T | undefined): import("./types").State<T>;
export declare function state<T>(t: T): import("./types").State<T>;
export default state;

@@ -1,2 +0,3 @@

import { State, Downstream, Upstream } from './types';
export declare function makeState<T>(initial: T | undefined, downstream: Downstream<T>, upstream: Upstream<T>): State<T>;
import { State, Downstream, Upstream, SubState } from './types';
export declare function makeState<T>(initial: T, downstream: Downstream<T>, upstream: Upstream<T>): State<T>;
export declare function makeState<T, K extends keyof T>(initial: T[K] | undefined, downstream: Downstream<T[K] | undefined>, upstream: Upstream<T[K]>): SubState<T, K>;

@@ -22,4 +22,12 @@ import { Source, Sink, START, DATA, END, Callbag } from 'callbag';

export declare type MsgType = START | DATA | END;
export declare type State<T> = Source<T | undefined> & Sink<T> & {
get(): T | undefined;
export declare type SubState<T, K extends keyof T> = Source<T[K] | undefined> & Sink<T[K]> & {
get(): T[K] | undefined;
set(t: T[K]): void;
clear(): void;
downstream(): Downstream<T[K] | undefined>;
upstream(): Upstream<T[K]>;
sub<K2 extends keyof T[K]>(key: K2): SubState<T[K], K2>;
};
export declare type State<T> = Source<T> & Sink<T> & {
get(): T;
set(t: T): void;

@@ -29,3 +37,3 @@ clear(): void;

upstream(): Upstream<T>;
sub<K extends keyof T>(key: K): State<T[K]>;
sub<K extends keyof T>(key: K): SubState<T, K>;
};

@@ -32,0 +40,0 @@ export declare function isState<T>(cb: Callbag<any, T>): cb is State<T>;

{
"name": "callbag-state",
"version": "0.1.1",
"version": "0.1.2",
"description": "Callbag-based State Management",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet