deep-storage
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -1,2 +0,2 @@ | ||
import { DeepStorage } from "./index"; | ||
import { DeepStorage, UsesDeepStorage } from "./index"; | ||
export declare enum AsyncStatus { | ||
@@ -19,6 +19,5 @@ Created = 0, | ||
} | ||
export interface DeepAsync<Request, Response> extends DeepAsyncData<Request, Response> { | ||
export interface DeepAsync<Request, Response> extends DeepAsyncData<Request, Response>, UsesDeepStorage<DeepAsyncData<Request, Response>> { | ||
run(request: Request): Promise<DeepAsyncData<Request, Response>>; | ||
rerun(): Promise<DeepAsyncData<Request, Response>>; | ||
storage: DeepStorage<DeepAsyncData<Request, Response>>; | ||
} | ||
@@ -25,0 +24,0 @@ export declare class AlreadyRunningError extends Error { |
@@ -56,2 +56,5 @@ export declare type StateUpdateCallback = <DeepState>(path: Path, newState: DeepState, oldState: DeepState) => void; | ||
} | ||
export interface UsesDeepStorage<State> { | ||
storage: DeepStorage<State>; | ||
} | ||
export declare type stringOrNumber = string | number; | ||
@@ -58,0 +61,0 @@ export declare type Path = stringOrNumber[]; |
{ | ||
"name": "deep-storage", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Simple observable state management for reactive applications", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -1,2 +0,2 @@ | ||
import { DeepStorage } from "./index"; | ||
import { DeepStorage, UsesDeepStorage } from "./index"; | ||
@@ -22,6 +22,7 @@ export enum AsyncStatus { | ||
export interface DeepAsync<Request, Response> extends DeepAsyncData<Request, Response> { | ||
export interface DeepAsync<Request, Response> extends | ||
DeepAsyncData<Request, Response>, | ||
UsesDeepStorage<DeepAsyncData<Request, Response>> { | ||
run(request: Request): Promise<DeepAsyncData<Request, Response>>; | ||
rerun(): Promise<DeepAsyncData<Request, Response>>; | ||
storage: DeepStorage<DeepAsyncData<Request, Response>> | ||
} | ||
@@ -28,0 +29,0 @@ |
@@ -88,2 +88,6 @@ export type StateUpdateCallback = <DeepState>(path: Path, newState: DeepState, oldState: DeepState) => void; | ||
export interface UsesDeepStorage<State> { | ||
storage: DeepStorage<State>; | ||
} | ||
export type stringOrNumber = string | number; | ||
@@ -90,0 +94,0 @@ export type Path = stringOrNumber[]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179954
1038