Installation
npm install --save @types/polyfill-service
Summary
This package contains type definitions for polyfill-service (https://github.com/financial-times/polyfill-service#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/polyfill-service.
index.d.ts
export type PolyfillFlag = "gated" | "always";
export type Unknown = "polyfill" | "ignore";
export interface Feature {
flags?: PolyfillFlag[] | undefined;
}
export interface Features {
[feature: string]: Feature;
}
export interface GetPolyfillsOptions {
uaString: string;
features?: Features | undefined;
excludes?: string[] | undefined;
}
export interface GetPolyfillStringOptions extends GetPolyfillsOptions {
minify?: boolean | undefined;
unknown?: Unknown | undefined;
}
export interface PolyfillSpec {
aliasOf?: Set<string> | undefined;
flags: Set<PolyfillFlag>;
}
export interface GetPolyfillsResponse {
[name: string]: PolyfillSpec;
}
export function listAllPolyfills(): Promise<readonly string[]>;
export function getPolyfillString(options: GetPolyfillStringOptions): Promise<string>;
export function getPolyfills(options: GetPolyfillsOptions): Promise<GetPolyfillsResponse>;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: none
Credits
These definitions were written by Arturas Molcanovas.