diff --git a/types/rollup-plugin-url/index.d.ts b/types/rollup-plugin-url/index.d.ts new file mode 100644 index 0000000000..056823cdfb --- /dev/null +++ b/types/rollup-plugin-url/index.d.ts @@ -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 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +/// +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; diff --git a/types/rollup-plugin-url/package.json b/types/rollup-plugin-url/package.json new file mode 100644 index 0000000000..ee69ca3cd2 --- /dev/null +++ b/types/rollup-plugin-url/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "rollup": "^0.63.4" + } +} diff --git a/types/rollup-plugin-url/rollup-plugin-url-tests.ts b/types/rollup-plugin-url/rollup-plugin-url-tests.ts new file mode 100644 index 0000000000..37468768af --- /dev/null +++ b/types/rollup-plugin-url/rollup-plugin-url-tests.ts @@ -0,0 +1,5 @@ +import url from 'rollup-plugin-url'; + +url(); // $ExpectType Plugin + +url({ emitFile: true, limit: 0 }); // $ExpectType Plugin diff --git a/types/rollup-plugin-url/tsconfig.json b/types/rollup-plugin-url/tsconfig.json new file mode 100644 index 0000000000..a102892c8c --- /dev/null +++ b/types/rollup-plugin-url/tsconfig.json @@ -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" + ] +} diff --git a/types/rollup-plugin-url/tslint.json b/types/rollup-plugin-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rollup-plugin-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }