Skip to content

Commit 66132a1

Browse files
committed
no message
1 parent cd0f45c commit 66132a1

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

index.d.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,7 @@ export declare namespace Find {
113113
| ''
114114
| number;
115115

116-
export type Event = 'FOUND' | 'SUCCEEDED'
117-
118-
export type SyncCallback = (file: File) => void
119-
export type AsyncProgressiveCallback = (event: Event, message: File) => void
120-
export type AsyncBasicCallback = (files: File[]) => void
121-
122-
export type ProgressiveModeEnabled = true
116+
export type Event = 'FOUND' | 'SUCCEEDED' | 'INTERRUPTED';
123117
}
124118

125119
export interface Attributes {
@@ -463,9 +457,9 @@ export function ejectDriveSync(letter: string, method: EjectDriveMethod): boolea
463457
export function ejectDriveAsync(letter: string, method: EjectDriveMethod): Promise<boolean>;
464458

465459
// https://github.com/xxoo/node-fswin/wiki/find
466-
export function find(pathToFind: string, callback: Find.AsyncProgressiveCallback, isProgressiveMode: Find.ProgressiveModeEnabled): boolean;
467-
export function find(pathToFind: string, callback: Find.AsyncBasicCallback): boolean;
468-
export function findSync(pathToFind: string, callback: Find.SyncCallback): number;
460+
export function find(pathToFind: string, callback: (event: Find.Event, message: Find.File | number) => boolean, isProgressiveMode: true): boolean;
461+
export function find(pathToFind: string, callback: (files: Find.File[]) => void): boolean;
462+
export function findSync(pathToFind: string, callback: (file: Find.File) => boolean): number;
469463
export function findSync(pathToFind: string): Find.File[];
470464
export function findAsync(pathToFind: string): Promise<Find.File[]>;
471465

0 commit comments

Comments
 (0)