-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
main.ts
35 lines (26 loc) · 1.27 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Wendigo from './lib/wendigo';
import BrowserInterface from './lib/browser/browser_interface';
import { WendigoPluginInterface, WendigoPluginAssertionInterface, PluginModule, BrowserSettings } from './lib/types';
import * as WendigoErrors from './lib/models/errors';
export const Errors = WendigoErrors; // tslint:disable-line variable-name
const wendigo = new Wendigo();
export async function createBrowser(settings: BrowserSettings = {}): Promise<BrowserInterface> {
return wendigo.createBrowser(settings);
}
export async function stop(): Promise<void> {
return wendigo.stop();
}
export function registerPlugin(name: string | PluginModule, plugin?: WendigoPluginInterface, assertions?: WendigoPluginAssertionInterface): void {
return wendigo.registerPlugin(name, plugin, assertions);
}
export function clearPlugins(): void {
return wendigo.clearPlugins();
}
// Types
export {
WendigoPluginInterface, WendigoPluginAssertionInterface,
PluginModule, BrowserSettings, WendigoSelector, GeoLocationCoords
} from './lib/types';
import { default as DomElementClass } from './lib/models/dom_element';
export interface DomElement extends DomElementClass {} // tslint:disable-line no-empty-interface
export { default as Browser } from './lib/browser/browser_interface';