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

deep-storage

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-storage - npm Package Compare versions

Comparing version 2.0.0 to 2.0.2

8

async.d.ts

@@ -8,5 +8,5 @@ import { DeepStorage, UsesDeepStorage } from "./index";

}
export interface DeepAsyncState<Response> {
export interface DeepAsyncState<Data> {
status: AsyncStatus;
data?: Response;
data?: Data;
error?: any;

@@ -21,3 +21,3 @@ }

run(): Promise<DeepAsyncState<Response>>;
updateResponse(updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>>;
update(updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>>;
}

@@ -31,3 +31,3 @@ export declare class AlreadyRunningError extends Error {

run: () => Promise<DeepAsyncState<Response>>;
updateResponse: (updater: (prevState: Response) => Response) => Promise<DeepAsyncState<Response>>;
update: (updater: (prevState: Response) => Response) => Promise<DeepAsyncState<Response>>;
readonly status: AsyncStatus;

@@ -34,0 +34,0 @@ readonly running: boolean;

@@ -108,3 +108,3 @@ "use strict";

}); };
this.updateResponse = function (updater) { return __awaiter(_this, void 0, void 0, function () {
this.update = function (updater) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {

@@ -111,0 +111,0 @@ switch (_a.label) {

{
"name": "deep-storage",
"version": "2.0.0",
"version": "2.0.2",
"description": "Simple observable state management for reactive applications",

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

@@ -10,11 +10,9 @@ import { DeepStorage, UsesDeepStorage } from "./index";

export interface DeepAsyncState<Response> {
export interface DeepAsyncState<Data> {
status: AsyncStatus;
data?: Response;
data?: Data;
error?: any;
}
export interface DeepAsync<Response> extends
DeepAsyncState<Response>,
UsesDeepStorage<DeepAsyncState<Response>> {
export interface DeepAsync<Response> extends DeepAsyncState<Response>, UsesDeepStorage<DeepAsyncState<Response>> {
completed: boolean;

@@ -26,3 +24,3 @@ succeeded: boolean;

run(): Promise<DeepAsyncState<Response>>;
updateResponse(updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>>;
update(updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>>;
}

@@ -52,3 +50,3 @@

}
updateResponse = async (updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>> => {
update = async (updater: (prevState: Response) => Response): Promise<DeepAsyncState<Response>> => {
await this.storage.update(

@@ -59,3 +57,3 @@ (state: DeepAsyncState<Response>) =>

status: AsyncStatus.Succeeded,
data: updater(state.data),
data: updater(state.data),
error: undefined

@@ -62,0 +60,0 @@ }));

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