@types/eventsource

  • Version 1.1.6
  • Published
  • 13 kB
  • No dependencies
  • MIT license

Install

npm i @types/eventsource
yarn add @types/eventsource
pnpm add @types/eventsource

Overview

TypeScript definitions for eventsource

Index

Classes

class EventSource

class EventSource {}

    constructor

    constructor(url: string, eventSourceInitDict?: EventSource.EventSourceInitDict);

      property CLOSED

      static readonly CLOSED: number;

        property CLOSED

        readonly CLOSED: number;

          property CONNECTING

          static readonly CONNECTING: number;

            property CONNECTING

            readonly CONNECTING: number;

              property onerror

              onerror: (evt: MessageEvent) => any;

                property onmessage

                onmessage: (evt: MessageEvent) => any;

                  property onopen

                  onopen: (evt: MessageEvent) => any;

                    property OPEN

                    static readonly OPEN: number;

                      property OPEN

                      readonly OPEN: number;

                        property readyState

                        readonly readyState: number;

                          property url

                          readonly url: string;

                            property withCredentials

                            readonly withCredentials: boolean;

                              method addEventListener

                              addEventListener: (type: string, listener: EventListener) => void;

                                method close

                                close: () => void;

                                  method dispatchEvent

                                  dispatchEvent: (evt: Event) => boolean;

                                    method removeEventListener

                                    removeEventListener: (type: string, listener?: EventListener) => void;

                                      Interfaces

                                      interface EventSourceInitDict

                                      interface EventSourceInitDict {}

                                        property headers

                                        headers?: object | undefined;

                                          property https

                                          https?: object | undefined;

                                            property proxy

                                            proxy?: string | undefined;

                                              property rejectUnauthorized

                                              rejectUnauthorized?: boolean | undefined;

                                                property withCredentials

                                                withCredentials?: boolean | undefined;

                                                  Enums

                                                  enum ReadyState

                                                  enum ReadyState {
                                                  CONNECTING = 0,
                                                  OPEN = 1,
                                                  CLOSED = 2,
                                                  }

                                                    member CLOSED

                                                    CLOSED = 2

                                                      member CONNECTING

                                                      CONNECTING = 0

                                                        member OPEN

                                                        OPEN = 1

                                                          Package Files (1)

                                                          Dependencies (0)

                                                          No dependencies.

                                                          Dev Dependencies (0)

                                                          No dev dependencies.

                                                          Peer Dependencies (0)

                                                          No peer dependencies.

                                                          Badge

                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/eventsource.

                                                          • Markdown
                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/eventsource)
                                                          • HTML
                                                            <a href="https://www.jsdocs.io/package/@types/eventsource"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>