UNPKG

2 kBTypeScriptView Raw
1import { HTMLDocument, HTMLElement } from '@hint/utils-dom';
2import { Event } from './event';
3import { ElementEvents } from './element-events';
4import { Problem } from '@hint/utils-types';
5import { Request, Response } from './network';
6export * from './event';
7export * from './element-events';
8export declare type ErrorEvent = Event & {
9 error: Error;
10};
11export declare type ScanStart = Event;
12export declare type ScanEnd = Event;
13export declare type FetchEnd = Event & {
14 element: HTMLElement | null;
15 request: Request;
16 response: Response;
17};
18export declare type FetchError = Event & {
19 element: HTMLElement | null;
20 error: any;
21 hops: string[];
22};
23export declare type FetchStart = Event;
24export declare type TraverseStart = Event;
25export declare type TraverseEnd = Event & {
26 document: HTMLDocument;
27};
28export declare type TraverseUp = Event & {
29 element: HTMLElement;
30};
31export declare type TraverseDown = Event & {
32 element: HTMLElement;
33};
34export declare type CanEvaluateScript = Event & {
35 document: HTMLDocument;
36};
37export declare type PrintEvent = Event & {
38 problems: Problem[];
39};
40export declare type Events = {
41 'can-evaluate::script': CanEvaluateScript;
42 'fetch::end::*': FetchEnd;
43 'fetch::end::css': FetchEnd;
44 'fetch::end::font': FetchEnd;
45 'fetch::end::html': FetchEnd;
46 'fetch::end::image': FetchEnd;
47 'fetch::end::json': FetchEnd;
48 'fetch::end::manifest': FetchEnd;
49 'fetch::end::script': FetchEnd;
50 'fetch::end::txt': FetchEnd;
51 'fetch::end::unknown': FetchEnd;
52 'fetch::end::xml': FetchEnd;
53 'fetch::error': FetchError;
54 'fetch::start': FetchStart;
55 'fetch::start::target': FetchStart;
56 'parse::error::*': ErrorEvent;
57 'print': PrintEvent;
58 'scan::end': ScanEnd;
59 'scan::start': ScanStart;
60 'traverse::down': TraverseDown;
61 'traverse::end': TraverseEnd;
62 'traverse::start': TraverseStart;
63 'traverse::up': TraverseUp;
64} & ElementEvents;
65//# sourceMappingURL=events.d.ts.map
\No newline at end of file