New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/eventsource

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/eventsource - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

142

eventsource/dom-monkeypatch.d.ts

@@ -9,64 +9,64 @@ /**

interface Event {
/**
* Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
*/
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
/**
* Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
*/
readonly composed: boolean;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
/**
* Returns true if event was dispatched by the user agent, and
* false otherwise.
*/
readonly isTrusted: boolean;
returnValue: boolean;
/**
* Returns the event's timestamp as the number of milliseconds measured relative to
* the time origin.
*/
readonly timeStamp: number;
/**
* Unauthorized and redirect error status codes (for example 401, 403, 301, 307)
*/
readonly status?: number | undefined;
/**
* Returns the type of event, e.g.
* "click", "hashchange", or
* "submit".
*/
readonly type: string;
readonly AT_TARGET: 2;
readonly BUBBLING_PHASE: 3;
readonly CAPTURING_PHASE: 1;
readonly NONE: 0;
composedPath(): any[];
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
preventDefault(): void;
/**
* Invoking this method prevents event from reaching
* any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any
* other objects.
*/
stopImmediatePropagation(): void;
/**
* When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
*/
stopPropagation(): void;
/**
* Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
*/
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
/**
* Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
*/
readonly composed: boolean;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
/**
* Returns true if event was dispatched by the user agent, and
* false otherwise.
*/
readonly isTrusted: boolean;
returnValue: boolean;
/**
* Returns the event's timestamp as the number of milliseconds measured relative to
* the time origin.
*/
readonly timeStamp: number;
/**
* Unauthorized and redirect error status codes (for example 401, 403, 301, 307)
*/
readonly status?: number | undefined;
/**
* Returns the type of event, e.g.
* "click", "hashchange", or
* "submit".
*/
readonly type: string;
readonly AT_TARGET: 2;
readonly BUBBLING_PHASE: 3;
readonly CAPTURING_PHASE: 1;
readonly NONE: 0;
composedPath(): any[];
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
preventDefault(): void;
/**
* Invoking this method prevents event from reaching
* any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any
* other objects.
*/
stopImmediatePropagation(): void;
/**
* When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
*/
stopPropagation(): void;
}
interface EventInit {
bubbles?: boolean | undefined;
cancelable?: boolean | undefined;
composed?: boolean | undefined;
bubbles?: boolean | undefined;
cancelable?: boolean | undefined;
composed?: boolean | undefined;
}
interface MessageEventInit<T = any> extends EventInit {
data?: T | undefined;
lastEventId?: string | undefined;
origin?: string | undefined;
data?: T | undefined;
lastEventId?: string | undefined;
origin?: string | undefined;
}

@@ -76,19 +76,19 @@

interface MessageEvent<T = any> extends Event {
/**
* Returns the data of the message.
*/
readonly data: T;
/**
* Returns the last event ID string, for server-sent events.
*/
readonly lastEventId: string;
/**
* Returns the origin of the message, for server-sent events and
* cross-document messaging.
*/
readonly origin: string;
/**
* Returns the data of the message.
*/
readonly data: T;
/**
* Returns the last event ID string, for server-sent events.
*/
readonly lastEventId: string;
/**
* Returns the origin of the message, for server-sent events and
* cross-document messaging.
*/
readonly origin: string;
}
declare var MessageEvent: {
prototype: MessageEvent;
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
prototype: MessageEvent;
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
};

@@ -17,35 +17,39 @@ // Type definitions for eventsource 1.1

declare class EventSource {
static readonly CLOSED: number;
static readonly CONNECTING: number;
static readonly OPEN: number;
static readonly CLOSED: number;
static readonly CONNECTING: number;
static readonly OPEN: number;
constructor(url: string, eventSourceInitDict?: EventSource.EventSourceInitDict);
constructor(url: string, eventSourceInitDict?: EventSource.EventSourceInitDict);
readonly CLOSED: number;
readonly CONNECTING: number;
readonly OPEN: number;
readonly url: string;
readonly readyState: number;
readonly withCredentials: boolean;
onopen: (evt: MessageEvent) => any;
onmessage: (evt: MessageEvent) => any;
onerror: (evt: MessageEvent) => any;
addEventListener(type: string, listener: (evt: MessageEvent) => void): void;
dispatchEvent(evt: Event): boolean;
removeEventListener(type: string, listener: (evt: MessageEvent) => void): void;
close(): void;
readonly CLOSED: number;
readonly CONNECTING: number;
readonly OPEN: number;
readonly url: string;
readonly readyState: number;
readonly withCredentials: boolean;
onopen: (evt: MessageEvent) => any;
onmessage: (evt: MessageEvent) => any;
onerror: (evt: MessageEvent) => any;
addEventListener(type: string, listener: (evt: MessageEvent) => void): void;
dispatchEvent(evt: Event): boolean;
removeEventListener(type: string, listener: (evt: MessageEvent) => void): void;
close(): void;
}
declare namespace EventSource {
enum ReadyState { CONNECTING = 0, OPEN = 1, CLOSED = 2 }
enum ReadyState {
CONNECTING = 0,
OPEN = 1,
CLOSED = 2,
}
interface EventSourceInitDict {
withCredentials?: boolean | undefined;
headers?: object | undefined;
proxy?: string | undefined;
https?: object | undefined;
rejectUnauthorized?: boolean | undefined;
}
interface EventSourceInitDict {
withCredentials?: boolean | undefined;
headers?: object | undefined;
proxy?: string | undefined;
https?: object | undefined;
rejectUnauthorized?: boolean | undefined;
}
}
export = EventSource;

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

import * as EventSource from '../../index';
import * as EventSource from "../../index";
export = EventSource;
{
"name": "@types/eventsource",
"version": "1.1.11",
"version": "1.1.12",
"description": "TypeScript definitions for eventsource",

@@ -38,4 +38,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eventsource",

"dependencies": {},
"typesPublisherContentHash": "2df4dbb36f67d849e4646975d4492e2af663514e410fe20d70e1595a9aca4f2d",
"typesPublisherContentHash": "26303e7bd7d1e78429d684051cb8548da98ef693d2c19aae2fe047085f010cdd",
"typeScriptVersion": "5.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 23 Jan 2023 16:02:35 GMT
* Last updated: Sat, 23 Sep 2023 17:07:22 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `MessageEvent`

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