1 |
|
2 | import * as url from 'url';
|
3 | import { EventEmitter2 as EventEmitter, Listener } from 'eventemitter2';
|
4 | import { HttpHeaders, Problem } from '@hint/utils-types';
|
5 | import { HTMLDocument, HTMLElement } from '@hint/utils-dom';
|
6 | import { Events, HintResources, IFetchOptions, IFormatter, NetworkData, StringKeyOf } from './types';
|
7 | import { Configuration } from './config';
|
8 | export declare class Engine<E extends Events = Events> extends EventEmitter {
|
9 | private parsers;
|
10 | private hints;
|
11 | private connector;
|
12 | private messages;
|
13 | private browserslist;
|
14 | private ignoredUrls;
|
15 | private _formatters;
|
16 | private _timeout;
|
17 | private _lang;
|
18 | get pageDOM(): HTMLDocument | undefined;
|
19 | get pageContent(): string | undefined;
|
20 | get pageHeaders(): HttpHeaders | undefined;
|
21 | get targetedBrowsers(): string[];
|
22 | get formatters(): IFormatter[];
|
23 | get timeout(): number;
|
24 | private isIgnored;
|
25 | constructor(config: Configuration, resources: HintResources);
|
26 | onHintEvent<K extends StringKeyOf<E>>(id: string, eventName: K, listener: (data: E[K], event: string) => void): void;
|
27 | fetchContent(target: string | url.URL, headers?: object): Promise<NetworkData>;
|
28 | evaluate(source: string): Promise<any>;
|
29 | close(): Promise<void>;
|
30 | report(problem: Problem): void;
|
31 | clean(fileUrl: url.URL): void;
|
32 | clear(): void;
|
33 | notify(this: Engine<Events>, resource: string): Promise<void>;
|
34 | executeOn(target: url.URL, options?: IFetchOptions): Promise<Problem[]>;
|
35 | querySelectorAll(selector: string): HTMLElement[];
|
36 | emit<K extends StringKeyOf<E>>(event: K, data: E[K]): boolean;
|
37 | emitAsync<K extends StringKeyOf<E>>(event: K, data: E[K]): Promise<any[]>;
|
38 | on<K extends StringKeyOf<E>>(event: K, listener: (data: E[K]) => void): this | Listener;
|
39 | get language(): string;
|
40 | }
|
41 | //# sourceMappingURL=engine.d.ts.map |
\ | No newline at end of file |