🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@types/ultron

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ultron

TypeScript definitions for ultron

ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
1.1.3
Version published
Weekly downloads
818
-35.03%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/ultron

Summary

This package contains type definitions for ultron (https://github.com/unshiftio/ultron).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ultron.

index.d.ts

type Listener = (...args: any[]) => void;

/**
 * A Node.js EventEmitter instance or an `eventemitter3` instance.
 */
interface EventEmitter {
    on(event: string | symbol, fn: Listener): void;
    once(event: string | symbol, fn: Listener): void;
    removeListener(event: string | symbol, fn: Listener): void;
    listeners(event: string | symbol): any[];
    eventNames?(): Array<string | symbol>;
}

/**
 * Ultron is high-intelligence robot. It gathers intelligence so it can start improving
 * upon his rudimentary design. It will learn from your EventEmitting patterns
 * and exterminate them.
 */
interface Ultron {
    /**
     * Register a new EventListener for the given event.
     *
     * @param event Name of the event.
     * @param fn Callback function.
     * @param context The context of the function.
     */
    on(event: string | symbol, fn: Listener, context?: any): this;

    /**
     * Add an EventListener that's only called once.
     *
     * @param event Name of the event.
     * @param fn Callback function.
     * @param context The context of the function.
     */
    once(event: string | symbol, fn: Listener, context?: any): this;

    /**
     * Remove the listeners we assigned for the given event(s).
     */
    remove(...names: Array<string | symbol>): this;

    /**
     * Destroy the Ultron instance, remove all listeners and release all references.
     */
    destroy(): boolean;
}

declare const Ultron: {
    /**
     * @param ee EventEmitter instance we need to wrap.
     */
    (ee: EventEmitter): Ultron;

    /**
     * @param ee EventEmitter instance we need to wrap.
     */
    new(ee: EventEmitter): Ultron;
};

declare namespace Ultron {
    export { EventEmitter, Listener };
}

export = Ultron;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Renée Kooi.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts