-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathindex.test-d.ts
25 lines (20 loc) · 849 Bytes
/
index.test-d.ts
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
import {expectType} from 'tsd';
import {deleteAsync, deleteSync} from './index.js';
const paths = [
'temp/*.js',
'!temp/unicorn.js',
];
// Del
expectType<Promise<string[]>>(deleteAsync('temp/*.js'));
expectType<Promise<string[]>>(deleteAsync(paths));
expectType<Promise<string[]>>(deleteAsync(paths, {force: true}));
expectType<Promise<string[]>>(deleteAsync(paths, {dryRun: true}));
expectType<Promise<string[]>>(deleteAsync(paths, {concurrency: 20}));
expectType<Promise<string[]>>(deleteAsync(paths, {cwd: ''}));
// Del (sync)
expectType<string[]>(deleteSync('tmp/*.js'));
expectType<string[]>(deleteSync(paths));
expectType<string[]>(deleteSync(paths, {force: true}));
expectType<string[]>(deleteSync(paths, {dryRun: true}));
expectType<string[]>(deleteSync(paths, {concurrency: 20}));
expectType<string[]>(deleteSync(paths, {cwd: ''}));