mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
[@types/browserslist] Added error.d.ts to browserslist (#33772)
* Added error.d.ts to browserslist * Upgrade browserslist version number * Added type test * Removed patch version and add space to test * Set browserslist to always be true
This commit is contained in:
committed by
Wesley Wigham
parent
79863ec50a
commit
1e3e89fe6f
@@ -1,4 +1,5 @@
|
||||
import browserslist from "browserslist";
|
||||
import BrowserslistError from "browserslist/error";
|
||||
|
||||
browserslist(); // $ExpectType string[]
|
||||
browserslist(""); // $ExpectType string[]
|
||||
@@ -20,3 +21,5 @@ for (const opt of opts) {
|
||||
|
||||
browserslist.coverage([""]); // $ExpectType number
|
||||
browserslist.coverage([""], { "": { "": 0 } }); // $ExpectType number
|
||||
|
||||
new BrowserslistError('error'); // $ExpectType BrowserslistError
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
declare class BrowserslistError extends Error {
|
||||
constructor(message: any);
|
||||
browserslist: true;
|
||||
}
|
||||
|
||||
export = BrowserslistError;
|
||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for browserslist 4.3
|
||||
// Type definitions for browserslist 4.4
|
||||
// Project: https://github.com/browserslist/browserslist#readme
|
||||
// Definitions by: Dave Cardwell <https://github.com/davecardwell>
|
||||
// Andrew Leedham <https://github.com/AndrewLeedham>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": ["index.d.ts", "browserslist-tests.ts"]
|
||||
"files": ["index.d.ts", "browserslist-tests.ts", "error.d.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user