@types/protractor-browser-logs
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

Installation

npm install --save @types/protractor-browser-logs

Summary

This package contains type definitions for protractor-browser-logs (https://github.com/wix/protractor-browser-logs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/protractor-browser-logs.

index.d.ts

import * as webdriver from "selenium-webdriver";
import Entry = webdriver.logging.Entry;
import { ProtractorBrowser } from "protractor/built";

declare namespace browserLogs {
    interface BrowserLogOptions {
        reporters?: Array<(entries: Entry[]) => void> | undefined;
    }

    type matchPredicateFunction = (entry: Entry) => boolean;
    type matchPredicate = string | RegExp | matchPredicateFunction;
    interface BrowserLogs {
        ERROR: matchPredicateFunction;
        WARNING: matchPredicateFunction;
        DEBUG: matchPredicateFunction;
        INFO: matchPredicateFunction;
        LOG: matchPredicateFunction;

        or(a: matchPredicateFunction, b: matchPredicateFunction): matchPredicateFunction;
        and(a: matchPredicateFunction, b: matchPredicateFunction): matchPredicateFunction;
        reset(): void;
        logs(): Entry[];
        verify(): void;
        ignore(...matches: matchPredicate[]): matchPredicateFunction[];
        expect(...matches: matchPredicate[]): matchPredicateFunction[];
    }
}

export = browserLogs;
declare function browserLogs(
    browser: ProtractorBrowser,
    options?: browserLogs.BrowserLogOptions,
): browserLogs.BrowserLogs;

Additional Details

Credits

These definitions were written by Saqib Rokadia.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/protractor-browser-logs

Weekly Downloads

9

Version

1.0.14

License

MIT

Unpacked Size

5.34 kB

Total Files

5

Last publish

Collaborators

  • types