0.5.4 • Published 6 months ago
@types/obsolete-web v0.5.4
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">×</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).