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

abort-controller-x

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

abort-controller-x - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

10

es/waitForEvent.d.ts

@@ -21,3 +21,3 @@ export declare type EventTargetLike<T> = EventTargetLike.HasEventTargetAddRemove<T> | EventTargetLike.NodeStyleEventEmitter | EventTargetLike.NodeCompatibleEventEmitter | EventTargetLike.JQueryStyleEventEmitter<any, T>;

*/
export declare function waitForEvent<T>(signal: AbortSignal, target: EventTargetLike<T>, eventName: string, options?: EventTargetLike.EventListenerOptions): Promise<T>;
export declare function waitForEvent<T>(signal: AbortSignal, target: EventTargetLike<T>, eventName: string | symbol, options?: EventTargetLike.EventListenerOptions): Promise<T>;
export declare namespace EventTargetLike {

@@ -34,8 +34,8 @@ interface NodeStyleEventEmitter {

interface JQueryStyleEventEmitter<TContext, T> {
on: (eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
off: (eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
on: (eventName: string | symbol, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
off: (eventName: string | symbol, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
}
interface HasEventTargetAddRemove<E> {
addEventListener(type: string, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: string, listener: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
addEventListener(type: string | symbol, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: string | symbol, listener: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
}

@@ -42,0 +42,0 @@ interface EventListenerOptions {

@@ -21,3 +21,3 @@ export declare type EventTargetLike<T> = EventTargetLike.HasEventTargetAddRemove<T> | EventTargetLike.NodeStyleEventEmitter | EventTargetLike.NodeCompatibleEventEmitter | EventTargetLike.JQueryStyleEventEmitter<any, T>;

*/
export declare function waitForEvent<T>(signal: AbortSignal, target: EventTargetLike<T>, eventName: string, options?: EventTargetLike.EventListenerOptions): Promise<T>;
export declare function waitForEvent<T>(signal: AbortSignal, target: EventTargetLike<T>, eventName: string | symbol, options?: EventTargetLike.EventListenerOptions): Promise<T>;
export declare namespace EventTargetLike {

@@ -34,8 +34,8 @@ interface NodeStyleEventEmitter {

interface JQueryStyleEventEmitter<TContext, T> {
on: (eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
off: (eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
on: (eventName: string | symbol, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
off: (eventName: string | symbol, handler: (this: TContext, t: T, ...args: any[]) => any) => void;
}
interface HasEventTargetAddRemove<E> {
addEventListener(type: string, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: string, listener: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
addEventListener(type: string | symbol, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
removeEventListener(type: string | symbol, listener: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
}

@@ -42,0 +42,0 @@ interface EventListenerOptions {

{
"name": "abort-controller-x",
"version": "0.4.1",
"version": "0.4.2",
"description": "Abortable async function helpers",

@@ -5,0 +5,0 @@ "keywords": [

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

import {execute} from './execute';
import { execute } from './execute';

@@ -31,3 +31,3 @@ export type EventTargetLike<T> =

target: EventTargetLike<T>,
eventName: string,
eventName: string | symbol,
options?: EventTargetLike.EventListenerOptions,

@@ -91,7 +91,7 @@ ): Promise<T> {

on: (
eventName: string,
eventName: string | symbol,
handler: (this: TContext, t: T, ...args: any[]) => any,
) => void;
off: (
eventName: string,
eventName: string | symbol,
handler: (this: TContext, t: T, ...args: any[]) => any,

@@ -103,3 +103,3 @@ ) => void;

addEventListener(
type: string,
type: string | symbol,
listener: ((evt: E) => void) | null,

@@ -109,3 +109,3 @@ options?: boolean | AddEventListenerOptions,

removeEventListener(
type: string,
type: string | symbol,
listener: ((evt: E) => void) | null,

@@ -130,3 +130,3 @@ options?: EventListenerOptions | boolean,

target: EventTargetLike<T>,
eventName: string,
eventName: string | symbol,
handler: (...args: any[]) => void,

@@ -133,0 +133,0 @@ options?: EventTargetLike.EventListenerOptions,

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