Add type definitions for rollup-plugin-url (#37462)

Signed-off-by: Jeroen Claassens <support@favware.tech>
This commit is contained in:
Jeroen Claassens
2019-08-08 10:20:44 -07:00
committed by Nathan Shively-Sanders
parent 4f3f0a7224
commit 985c9cf6b2
5 changed files with 58 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
// Type definitions for rollup-plugin-url 2.2
// Project: https://github.com/Swatinem/rollup-plugin-url#readme
// Definitions by: Jeroen Claassens <https://github.com/me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
/// <reference types="node" />
import { Plugin } from 'rollup';
interface PluginURLOptions {
limit?: number;
include?: string[];
exclude?: string[];
publicPath?: string;
emitFile?: boolean;
fileName?: string;
sourceDir?: string;
destDist?: string;
}
declare function url(options?: PluginURLOptions): Plugin;
export default url;
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"rollup": "^0.63.4"
}
}
@@ -0,0 +1,5 @@
import url from 'rollup-plugin-url';
url(); // $ExpectType Plugin
url({ emitFile: true, limit: 0 }); // $ExpectType Plugin
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"rollup-plugin-url-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }