UNPKG

970 BTypeScriptView Raw
1// Type definitions for caniuse-api 3.0
2// Project: https://github.com/nyalab/caniuse-api#readme
3// Definitions by: Dave Cardwell <https://github.com/davecardwell>
4// Matt Miller <https://github.com/matt123miller>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7export const features: string[];
8
9export interface BrowserSupport {
10 [browser: string]: {
11 y?: number | undefined;
12 n?: number | undefined;
13 a?: number | undefined;
14 x?: number | undefined;
15 p?: number | undefined;
16 };
17}
18
19export function getSupport(feature: string): BrowserSupport;
20
21export function isSupported(
22 feature: string,
23 browsers: string | ReadonlyArray<string>
24): boolean;
25
26export function find(query: string): string[];
27
28export function getLatestStableBrowsers(): string[];
29
30export function setBrowserScope(
31 browserscope: string | ReadonlyArray<string>
32): void;
33
34export function getBrowserScope(): string[];