mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
Fix del typings - Return promise rather instead of taking in a callback. #5908
This commit is contained in:
Vendored
+7
-10
@@ -4,23 +4,20 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../glob/glob.d.ts"/>
|
||||
/// <reference path="../es6-promise/es6-promise.d.ts" />
|
||||
|
||||
declare module "del" {
|
||||
import glob = require("glob");
|
||||
|
||||
function Del(pattern: string): void;
|
||||
function Del(pattern: string, options: Del.Options): void;
|
||||
function Del(pattern: string, callback: (err: Error, deletedFiles: string[]) => any): void;
|
||||
function Del(pattern: string, options: Del.Options, callback: (err: Error, deletedFiles: string[]) => any): void;
|
||||
function Del(pattern: string): Promise<string[]>;
|
||||
function Del(pattern: string, options: Del.Options): Promise<string[]>;
|
||||
|
||||
function Del(patterns: string[]): void;
|
||||
function Del(patterns: string[], options: Del.Options): void;
|
||||
function Del(patterns: string[], callback: (err: Error, deletedFiles: string[]) => any): void;
|
||||
function Del(patterns: string[], options: Del.Options, callback: (err: Error, deletedFiles: string[]) => any): void;
|
||||
function Del(patterns: string[]): Promise<string[]>;
|
||||
function Del(patterns: string[], options: Del.Options): Promise<string[]>;
|
||||
|
||||
module Del {
|
||||
function sync(pattern: string, options?: Options): void;
|
||||
function sync(patterns: string[], options?: Options): void;
|
||||
function sync(pattern: string, options?: Options): string[];
|
||||
function sync(patterns: string[], options?: Options): string[];
|
||||
|
||||
interface Options extends glob.IOptions {
|
||||
force?: boolean
|
||||
|
||||
Reference in New Issue
Block a user