Skip to content

Commit 2864a2d

Browse files
committed
fix(ts): detail SaveOptions and FileSaveOptions
1 parent 4fd3757 commit 2864a2d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

storage.d.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ declare namespace AV {
4545
ttl?: number;
4646
}
4747

48+
interface FileSaveOptions extends AuthOptions {
49+
onprogress?: (event: {
50+
loaded: number,
51+
total: number,
52+
percent: number,
53+
}) => void;
54+
}
55+
4856
export interface WaitOption {
4957
/**
5058
* Set to true to wait for the server to confirm success
@@ -158,7 +166,7 @@ declare namespace AV {
158166
name(): string;
159167
ownerId(): string;
160168
url(): string;
161-
save(options?: AuthOptions): Promise<File>;
169+
save(options?: FileSaveOptions): Promise<File>;
162170
setACL(acl?: ACL): any;
163171
size(): any;
164172
thumbnailURL(width: number, height: number): string;
@@ -306,7 +314,10 @@ declare namespace AV {
306314

307315
interface DestroyAllOptions extends AuthOptions { }
308316

309-
interface SaveOptions extends AuthOptions, SilentOption, WaitOption { }
317+
interface SaveOptions extends AuthOptions, SilentOption, WaitOption {
318+
fetchWhenSave?: boolean,
319+
where?: Query,
320+
}
310321

311322
interface SaveAllOptions extends AuthOptions { }
312323

0 commit comments

Comments
 (0)