mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Adds interface for fetchUpdateAsync() params
This commit is contained in:
@@ -834,7 +834,7 @@ async () => {
|
||||
console.log(updateCheckResult.manifest);
|
||||
}
|
||||
|
||||
Updates.fetchUpdateAsync(updateEventListener);
|
||||
Updates.fetchUpdateAsync({ eventListener: updateEventListener });
|
||||
|
||||
const bundleFetchResult = await Updates.fetchUpdateAsync();
|
||||
|
||||
|
||||
Vendored
+6
-1
@@ -2915,6 +2915,11 @@ export namespace Updates {
|
||||
message?: string;
|
||||
}
|
||||
|
||||
/** An optional params object passed to fetchUpdateAsync. */
|
||||
interface FetchUpdateAsyncParams {
|
||||
eventListener: UpdateEventListener;
|
||||
}
|
||||
|
||||
type UpdateEventListener = (event: UpdateEvent) => any;
|
||||
|
||||
/**
|
||||
@@ -2934,7 +2939,7 @@ export namespace Updates {
|
||||
* Downloads the most recent published version of your experience to the device's local cache.
|
||||
* Rejects if `updates.enabled` is `false` in app.json.
|
||||
*/
|
||||
function fetchUpdateAsync(listener?: UpdateEventListener): Promise<UpdateBundle>;
|
||||
function fetchUpdateAsync(params?: FetchUpdateAsyncParams): Promise<UpdateBundle>;
|
||||
|
||||
/**
|
||||
* Immediately reloads the current experience.
|
||||
|
||||
Reference in New Issue
Block a user