1 |
|
2 | import { URL } from 'url';
|
3 | import { ProblemLocation, Severity, CodeFix } from '@hint/utils-types';
|
4 | import { ProblemDocumentation } from '@hint/utils-types';
|
5 | import { HTMLElement } from '@hint/utils-dom';
|
6 | import { Engine } from './engine';
|
7 | import { Events, HintMetadata, NetworkData, StringKeyOf } from './types';
|
8 | export declare type CodeLanguage = 'css' | 'html' | 'http' | 'javascript';
|
9 | export declare type ReportOptions = {
|
10 | attribute?: string;
|
11 | browsers?: string[];
|
12 | codeSnippet?: string;
|
13 | content?: string;
|
14 | documentation?: ProblemDocumentation[];
|
15 | element?: HTMLElement | null;
|
16 | location?: ProblemLocation | null;
|
17 | severity: Severity;
|
18 | forceSeverity?: boolean;
|
19 | codeLanguage?: CodeLanguage;
|
20 | fixes?: CodeFix[];
|
21 | };
|
22 | export declare class HintContext<E extends Events = Events> {
|
23 | private id;
|
24 | private options;
|
25 | private meta;
|
26 | private severity;
|
27 | private engine;
|
28 | private ignoredUrls;
|
29 | constructor(hintId: string, engine: Engine<E>, severity: Severity, options: any, meta: HintMetadata, ignoredUrls: RegExp[]);
|
30 | get engineKey(): object;
|
31 | get pageDOM(): import("@hint/utils-dom").HTMLDocument | undefined;
|
32 | get pageContent(): string | undefined;
|
33 | get pageHeaders(): import("@hint/utils-types").HttpHeaders | undefined;
|
34 | get targetedBrowsers(): string[];
|
35 | get hintOptions(): any;
|
36 | evaluate(source: string): Promise<any>;
|
37 | fetchContent(target: string | URL, headers?: object): Promise<NetworkData>;
|
38 | querySelectorAll(selector: string): HTMLElement[];
|
39 | private adjustFixLocations;
|
40 | findProblemLocation(element: HTMLElement, offset: ProblemLocation | null, attribute?: string): ProblemLocation | null;
|
41 | report(resource: string, message: string, options: ReportOptions): void;
|
42 | on<K extends StringKeyOf<E>>(event: K, listener: (data: E[K], event: string) => void): void;
|
43 | isUrlIgnored(resource: string): boolean;
|
44 | get language(): string;
|
45 | }
|
46 | //# sourceMappingURL=hint-context.d.ts.map |
\ | No newline at end of file |