-
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathindex.d.ts
More file actions
25 lines (20 loc) · 638 Bytes
/
index.d.ts
File metadata and controls
25 lines (20 loc) · 638 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
export type Options = {
/**
Enable globbing when matching file paths.
@default true
*/
readonly glob?: boolean;
};
/**
Move files and folders to the trash.
@param input - Accepts paths and [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). Non-existent files and glob patterns that match nothing are silently ignored. If you need to know whether files were actually trashed, check for their existence beforehand.
@example
```
import trash from 'trash';
await trash(['*.png', '!rainbow.png']);
```
*/
export default function trash(
input: string | readonly string[],
options?: Options
): Promise<void>;