Skip to content

Commit 7bd6034

Browse files
committed
fix(ts): detail SaveOptions and FileSaveOptions
1 parent 5f66abe commit 7bd6034

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
@@ -38,6 +38,14 @@ declare namespace AV {
3838
ttl?: number;
3939
}
4040

41+
interface FileSaveOptions extends AuthOptions {
42+
onprogress?: (event: {
43+
loaded: number,
44+
total: number,
45+
percent: number,
46+
}) => void;
47+
}
48+
4149
export interface WaitOption {
4250
/**
4351
* Set to true to wait for the server to confirm success
@@ -151,7 +159,7 @@ declare namespace AV {
151159
name(): string;
152160
ownerId(): string;
153161
url(): string;
154-
save(options?: AuthOptions): Promise<File>;
162+
save(options?: FileSaveOptions): Promise<File>;
155163
setACL(acl?: ACL): any;
156164
size(): any;
157165
thumbnailURL(width: number, height: number): string;
@@ -298,7 +306,10 @@ declare namespace AV {
298306

299307
interface DestroyAllOptions extends AuthOptions { }
300308

301-
interface SaveOptions extends AuthOptions, SilentOption, WaitOption { }
309+
interface SaveOptions extends AuthOptions, SilentOption, WaitOption {
310+
fetchWhenSave?: boolean,
311+
where?: Query,
312+
}
302313

303314
interface SaveAllOptions extends AuthOptions { }
304315

0 commit comments

Comments
 (0)