Skip to content

Commit dc78419

Browse files
authored
fix: Incorrect type in ParseObject.fetch parameter options (#2726)
1 parent cad6902 commit dc78419

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ParseObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ class ParseObject<T extends Attributes = Attributes> {
12501250
* @returns {Promise} A promise that is fulfilled when the fetch
12511251
* completes.
12521252
*/
1253-
fetch(options: FetchOptions): Promise<this> {
1253+
fetch(options?: FetchOptions): Promise<this> {
12541254
const fetchOptions = ParseObject._getRequestOptions(options);
12551255
const controller = CoreManager.getObjectController();
12561256
return controller.fetch(this, true, fetchOptions) as Promise<this>;

types/ParseObject.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ declare class ParseObject<T extends Attributes = Attributes> {
448448
* @returns {Promise} A promise that is fulfilled when the fetch
449449
* completes.
450450
*/
451-
fetch(options: FetchOptions): Promise<this>;
451+
fetch(options?: FetchOptions): Promise<this>;
452452
/**
453453
* Fetch the model from the server. If the server's representation of the
454454
* model differs from its current attributes, they will be overriden.

0 commit comments

Comments
 (0)