Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.2.2 to 0.2.3

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, SubState, MsgType, _Start, _Data, _End, } from './types';
export { Change, ChangeTrace, ChangeTraceLeaf, ChangeTraceNode, isLeaf, Downstream, Upstream, StateLike, State, isState, SubState, MsgType, _Start, _Data, _End, } from './types';
export { broadcast } from './util/broadcast';
export declare function state<T>(t: T): import("./types").State<T>;
export default state;

@@ -23,17 +23,16 @@ import { Source, Sink, START, DATA, END, Callbag } from 'callbag';

export declare type StateMsgType = MsgType | typeof _Latest | typeof _Downstream | typeof _Upstream;
export declare type SubState<T, K extends keyof T> = Callbag<T[K], T[K] | undefined> & {
get(): T[K] | undefined;
set(t: T[K]): void;
export declare type StateLike<T> = Callbag<T, T | undefined> & {
get(): T;
set(t: T): void;
clear(): void;
sub<K extends keyof T>(key: K): SubState<T, K>;
};
export declare type SubState<T, K extends keyof T> = StateLike<T[K]> & {
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> = Callbag<T, T> & {
export declare type State<T> = StateLike<T> & {
get(): T;
set(t: T): void;
clear(): void;
downstream(): Downstream<T>;
upstream(): Upstream<T>;
sub<K extends keyof T>(key: K): SubState<T, K>;
};

@@ -40,0 +39,0 @@ export declare function isState<T>(cb: Source<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, SubState, MsgType, _Start, _Data, _End, } from './types';
export { Change, ChangeTrace, ChangeTraceLeaf, ChangeTraceNode, isLeaf, Downstream, Upstream, StateLike, State, isState, SubState, MsgType, _Start, _Data, _End, } from './types';
export { broadcast } from './util/broadcast';
export declare function state<T>(t: T): import("./types").State<T>;
export default state;

@@ -23,17 +23,16 @@ import { Source, Sink, START, DATA, END, Callbag } from 'callbag';

export declare type StateMsgType = MsgType | typeof _Latest | typeof _Downstream | typeof _Upstream;
export declare type SubState<T, K extends keyof T> = Callbag<T[K], T[K] | undefined> & {
get(): T[K] | undefined;
set(t: T[K]): void;
export declare type StateLike<T> = Callbag<T, T | undefined> & {
get(): T;
set(t: T): void;
clear(): void;
sub<K extends keyof T>(key: K): SubState<T, K>;
};
export declare type SubState<T, K extends keyof T> = StateLike<T[K]> & {
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> = Callbag<T, T> & {
export declare type State<T> = StateLike<T> & {
get(): T;
set(t: T): void;
clear(): void;
downstream(): Downstream<T>;
upstream(): Upstream<T>;
sub<K extends keyof T>(key: K): SubState<T, K>;
};

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

{
"name": "callbag-state",
"version": "0.2.2",
"version": "0.2.3",
"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

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