mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #32598 from vladshcherbin/rollup-plugin-delete
[rollup-plugin-delete] Add types
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
// Type definitions for rollup-plugin-delete 0.2
|
||||
// Project: https://github.com/vladshcherbin/rollup-plugin-delete#readme
|
||||
// Definitions by: Vlad Shcherbin <https://github.com/vladshcherbin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import del = require('del');
|
||||
import { Plugin } from 'rollup';
|
||||
|
||||
export interface Options extends del.Options {
|
||||
/**
|
||||
* Patterns of files and folders to be deleted.
|
||||
* @default []
|
||||
*/
|
||||
readonly targets: ReadonlyArray<string> | string;
|
||||
|
||||
/**
|
||||
* Outputs removed files and folders to console.
|
||||
* @default false
|
||||
*/
|
||||
readonly verbose?: boolean;
|
||||
}
|
||||
|
||||
export default function(options?: Options): Plugin;
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"rollup": ">=0.60.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import del from 'rollup-plugin-delete';
|
||||
|
||||
del(); // $ExpectType Plugin
|
||||
|
||||
del({}); // $ExpectError
|
||||
|
||||
del({ targets: '/dist' }); // $ExpectType Plugin
|
||||
|
||||
del({ targets: ['/dist'], verbose: true }); // $ExpectType Plugin
|
||||
|
||||
del({ targets: ['/dist'], verbose: true, dryRun: true }); // $ExpectType Plugin
|
||||
|
||||
del({ targets: ['/dist'], verbose: true, dryRun: true, debug: true }); // $ExpectType Plugin
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"rollup-plugin-delete-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user