@types/react-native-event-source
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Installation

npm install --save @types/react-native-event-source

Summary

This package contains type definitions for react-native-event-source (https://github.com/jordanbyron/react-native-event-source#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-event-source.

index.d.ts

export interface MessageEvent {
    data: string | null;
    type: string;
    lastEventId: string;
    origin: string;
}

export type ListenerCallback = (event: MessageEvent) => void;

declare class RNEventSource {
    constructor(url: string, options?: {});
    addEventListener(type: string, listener: ListenerCallback): any;
    removeAllListeners(): void;
    removeListener(type: string, listener: ListenerCallback): void;
    close(): void;
}

export default RNEventSource;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Alexander Tartmin.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/react-native-event-source

      Weekly Downloads

      4,329

      Version

      1.1.2

      License

      MIT

      Unpacked Size

      3.67 kB

      Total Files

      5

      Last publish

      Collaborators

      • types