Skip to content

Commit 4f19a42

Browse files
committed
types in onSuccess, onError
1 parent 465d135 commit 4f19a42

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React from 'react';
2+
import { PickerFileMetadata } from 'filestack-js';
23

34
type FilestackAction = 'transform' | 'retrieve' | 'metadata' | 'storeUrl' | 'upload' | 'multiupload' | 'remove' | 'pick' | 'removeMetadata' | 'preview' | 'logout';
45

56
type ComponentDisplayModeType = 'button' | 'link' | 'immediate';
67

78
interface FilestackResult {}
89

9-
interface FilestackError {}
10+
// interface FilestackError {}
1011

1112
interface Props {
1213
apikey: string;
@@ -17,8 +18,8 @@ interface Props {
1718
customClass?: string;
1819
};
1920
// actionOptions
20-
onSuccess?: (result: FilestackResult) => void;
21-
onError?: (error: FilestackError) => void;
21+
onSuccess?: (result: PickerFileMetadata[]) => void;
22+
onError?: (error: PickerFileMetadata[]) => void;
2223
clientOptions?: {
2324
cname?: string;
2425
security?: {

0 commit comments

Comments
 (0)