diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 1858faa549..2e9aa07198 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -834,7 +834,7 @@ async () => { console.log(updateCheckResult.manifest); } - Updates.fetchUpdateAsync(updateEventListener); + Updates.fetchUpdateAsync({ eventListener: updateEventListener }); const bundleFetchResult = await Updates.fetchUpdateAsync(); diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 36afc712ab..4633a83dd7 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -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; + function fetchUpdateAsync(params?: FetchUpdateAsyncParams): Promise; /** * Immediately reloads the current experience.