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:
+9
-8
@@ -7,11 +7,11 @@ del(["tmp/*.js", "!tmp/unicorn.js"]);
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], (err, paths) => {
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}, (err, paths) => {
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
@@ -19,18 +19,19 @@ del("tmp/*.js");
|
||||
|
||||
del("tmp/*.js", {force: true});
|
||||
|
||||
del("tmp/*.js", (err, paths) => {
|
||||
del("tmp/*.js").then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del("tmp/*.js", {force: true}, (err, paths) => {
|
||||
del("tmp/*.js", {force: true}).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del.sync(["tmp/*.js", "!tmp/unicorn.js"]);
|
||||
var paths: string[];
|
||||
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]);
|
||||
|
||||
del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
|
||||
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
|
||||
|
||||
del.sync("tmp/*.js");
|
||||
paths = del.sync("tmp/*.js");
|
||||
|
||||
del.sync("tmp/*.js", {force: true});
|
||||
paths = del.sync("tmp/*.js", {force: true});
|
||||
|
||||
Reference in New Issue
Block a user