0.5.4 • Published 6 months ago

@types/obsolete-web v0.5.4

Weekly downloads
54
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/obsolete-web

Summary

This package contains type definitions for obsolete-web (https://github.elenet.me/fe/obsolete-webpack-plugin).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/obsolete-web.

index.d.ts

// Type definitions for obsolete-web 0.5
// Project: https://github.elenet.me/fe/obsolete-webpack-plugin
// Definitions by: Piotr Błażejewicz (Peter Blazejewicz) <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare class Obsolete {
    constructor(options?: Options);
    static defaultOptions: Readonly<Required<Options>>;
    /**
     * Test browser compatibility.
     */
    test(browsers: string[], done?: () => void): boolean;
}

interface Options {
    /**
     * The prompt html template injected to the bottom of body. The default value is:
     * ```html
     * <div>Your browser is not supported. <button id="obsoleteClose">&times;</button></div>
     * ```
     */
    template?: string | undefined;
    /**
     * If set 'afterbegin', the template will be injected into the start of body.
     * If set 'beforeend', the template will be injected into the end of body
     * @default 'afterbegin'
     */
    position?: 'afterbeing' | 'beforened' | undefined;
    /**
     * If the current browser useragent doesn't match one of the target browsers, it's considered as unsupported.
     * Thus, the prompt will be shown.
     * @default false
     */
    promptOnNonTargetBrowser?: boolean | undefined;
    /**
     * If the current browser useragent is unknown, the prompt will be shown
     * @default true
     */
    promptOnUnknownBrowser?: boolean | undefined;
}

export as namespace Obsolete;

export = Obsolete;

Additional Details

  • Last updated: Thu, 08 Jul 2021 18:51:45 GMT
  • Dependencies: none
  • Global values: Obsolete

Credits

These definitions were written by Piotr Błażejewicz (Peter Blazejewicz).

0.5.4

6 months ago

0.5.3

7 months ago

0.5.2

8 months ago

0.5.1

3 years ago

0.5.0

4 years ago