Skip to content

Commit 693be0c

Browse files
Add FilePlaceholderId type for improved type safety in TFetchDataCallback
1 parent 850e4c3 commit 693be0c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/types/callbacks.type.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
export type NapiCallbackFunction = (...args: any[]) => any;
22

3+
export type FilePlaceholderIdPrefixType = "FILE:";
4+
5+
export type FilePlaceholderId = `${FilePlaceholderIdPrefixType}${string}`;
6+
37
export type TFetchDataCallback = (
4-
id: string,
8+
id: FilePlaceholderId,
59
callback: (data: boolean, path: string, errorHandler?: () => void) => Promise<{ finished: boolean; progress: number }>,
610
) => void;
711

0 commit comments

Comments
 (0)