edge-mock
Version:
types for testing an developer edge applications
35 lines (34 loc) • 1.32 kB
TypeScript
export declare class EdgeFetchEvent implements FetchEvent {
readonly type: 'fetch';
readonly request: Request;
_response: Response | Promise<Response> | null;
readonly _wait_until_promises: Promise<any>[];
constructor(type: 'fetch', init: FetchEventInit);
respondWith(response: Response | Promise<Response>): void;
waitUntil(f: Promise<any>): void;
get clientId(): string;
get resultingClientId(): string;
get bubbles(): boolean;
get cancelBubble(): boolean;
get cancelable(): boolean;
get composed(): boolean;
get currentTarget(): EventTarget | null;
get defaultPrevented(): boolean;
get isTrusted(): boolean;
get returnValue(): boolean;
get srcElement(): EventTarget | null;
get target(): EventTarget | null;
get timeStamp(): number;
get eventPhase(): number;
get AT_TARGET(): number;
get BUBBLING_PHASE(): number;
get CAPTURING_PHASE(): number;
get NONE(): number;
get preloadResponse(): Promise<any>;
get initEvent(): (_type: string, _bubbles?: boolean, _cancelable?: boolean) => void;
get passThroughOnException(): () => void;
get composedPath(): () => EventTarget[];
get preventDefault(): () => void;
get stopImmediatePropagation(): () => void;
get stopPropagation(): () => void;
}