@types/consolidated-events
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Installation

npm install --save @types/consolidated-events

Summary

This package contains type definitions for consolidated-events (https://github.com/lencioni/consolidated-events#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/consolidated-events.

type EventMap = GlobalEventHandlersEventMap;
type EventMapKeys = keyof EventMap;

export function addEventListener<TEventName extends EventMapKeys | string>(
    target: EventTarget,
    eventName: TEventName,
    listener: (event: TEventName extends EventMapKeys ? EventMap[TEventName] : Event) => any,
    options?: boolean | AddEventListenerOptions,
): () => void;

// Disable automatic exports for helper types above
export {};

Additional Details

  • Last updated: Tue, 09 Apr 2024 01:28:34 GMT
  • Dependencies: none

Credits

These definitions were written by Matt Wade.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/consolidated-events

Weekly Downloads

34

Version

2.0.0

License

MIT

Unpacked Size

3.49 kB

Total Files

5

Last publish

Collaborators

  • types