mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add types for copyfiles
This commit is contained in:
parent
d5fe4dcadb
commit
ca49ffe5c8
6
types/copyfiles/copyfiles-tests.ts
Normal file
6
types/copyfiles/copyfiles-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import copyfiles = require('copyfiles');
|
||||
|
||||
copyfiles(['file'], () => {});
|
||||
copyfiles(['file'], error => {});
|
||||
copyfiles(['file'], {all: true}, error => {});
|
||||
copyfiles(['file'], 10, error => {});
|
||||
30
types/copyfiles/index.d.ts
vendored
Normal file
30
types/copyfiles/index.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
// Type definitions for copyfiles 2.1
|
||||
// Project: https://github.com/calvinmetcalf/copyfiles#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace copyfiles {
|
||||
interface Options {
|
||||
/** include files & directories begining with a dot (.) */
|
||||
all?: boolean;
|
||||
/** throw error if nothing is copied */
|
||||
error?: boolean;
|
||||
/** pattern or glob to exclude */
|
||||
exclude?: string;
|
||||
/** flatten the output */
|
||||
flat?: boolean;
|
||||
/** do not overwrite destination files if they exist */
|
||||
soft?: boolean;
|
||||
/** slice a path off the bottom of the paths */
|
||||
up?: number;
|
||||
/** print more information to console */
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
type Callback = (error?: Error) => void;
|
||||
}
|
||||
|
||||
declare function copyfiles(paths: string[], options: copyfiles.Options | number, callback: copyfiles.Callback): void;
|
||||
declare function copyfiles(paths: string[], callback: copyfiles.Callback): void;
|
||||
|
||||
export = copyfiles;
|
||||
23
types/copyfiles/tsconfig.json
Normal file
23
types/copyfiles/tsconfig.json
Normal file
@ -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",
|
||||
"copyfiles-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/copyfiles/tslint.json
Normal file
1
types/copyfiles/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user