Skip to content

Commit 850dfff

Browse files
committed
fix(FileItem): update trash import
1 parent b433f3b commit 850dfff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Item.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from 'fs-extra';
22
import * as path from 'path';
33

4-
import trash = require('trash');
4+
import trash from 'trash';
55

66
export class FileItem {
77

@@ -44,7 +44,7 @@ export class FileItem {
4444
}
4545

4646
public async remove(useTrash = false): Promise<FileItem> {
47-
await useTrash ? trash([this.path]) : fs.remove(this.path);
47+
await useTrash ? trash(this.path) : fs.remove(this.path);
4848

4949
return this;
5050
}

0 commit comments

Comments
 (0)