@types/obsolete-web
TypeScript icon, indicating that this package has built-in type declarations

0.5.4 • Public • Published

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

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: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/obsolete-web

      Weekly Downloads

      2

      Version

      0.5.4

      License

      MIT

      Unpacked Size

      5.1 kB

      Total Files

      5

      Last publish

      Collaborators

      • types