New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yume-chan/async-operation-manager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yume-chan/async-operation-manager - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

renovate.json

5

lib/index.d.ts
export declare type PromiseResolverState = 'running' | 'resolved' | 'rejected';
export declare class PromiseResolver<T> {
private _promise;
readonly promise: Promise<T>;
get promise(): Promise<T>;
private _resolve;
private _reject;
private _state;
readonly state: PromiseResolverState;
get state(): PromiseResolverState;
constructor();

@@ -20,2 +20,3 @@ resolve(value?: T | PromiseLike<T>): void;

private operations;
constructor(initialId?: number);
add<T>(): AsyncOperationInfo<T>;

@@ -22,0 +23,0 @@ private getResolver;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PromiseResolver = void 0;
var PromiseResolver = /** @class */ (function () {

@@ -14,3 +15,3 @@ function PromiseResolver() {

get: function () { return this._promise; },
enumerable: true,
enumerable: false,
configurable: true

@@ -20,3 +21,3 @@ });

get: function () { return this._state; },
enumerable: true,
enumerable: false,
configurable: true

@@ -36,5 +37,6 @@ });

var AsyncOperationManager = /** @class */ (function () {
function AsyncOperationManager() {
this.operationId = 0;
function AsyncOperationManager(initialId) {
if (initialId === void 0) { initialId = 0; }
this.operations = new Map();
this.operationId = initialId;
}

@@ -41,0 +43,0 @@ AsyncOperationManager.prototype.add = function () {

10

package.json
{
"name": "@yume-chan/async-operation-manager",
"version": "1.0.1",
"version": "1.0.3",
"description": "Utilities to manage RPC operations.",

@@ -30,7 +30,7 @@ "main": "lib/index.js",

"devDependencies": {
"@types/jest": "^24.0.15",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
"typescript": "^3.5.2"
"@types/jest": "25.2.3",
"jest": "26.0.1",
"ts-jest": "26.0.0",
"typescript": "3.9.3"
}
}

@@ -38,6 +38,10 @@ export type PromiseResolverState = 'running' | 'resolved' | 'rejected';

export default class AsyncOperationManager {
private operationId: number = 0;
private operationId: number;
private operations: Map<number, PromiseResolver<any>> = new Map();
public constructor(initialId: number = 0) {
this.operationId = initialId;
}
public add<T>(): AsyncOperationInfo<T> {

@@ -44,0 +48,0 @@ const id = this.operationId++;

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