We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc9ebc3 commit 7c6c98cCopy full SHA for 7c6c98c
examples/react-native/src/lib/api.ts
@@ -18,7 +18,7 @@ function delay(t: number, v: () => void) {
18
});
19
}
20
21
-export function fetchMovies(): Promise<Movie[]> {
+export async function fetchMovies() {
22
console.log('fetchMovies');
23
return delay(200 + Math.floor(Math.random() * 2000), () =>
24
movies
@@ -27,7 +27,7 @@ export function fetchMovies(): Promise<Movie[]> {
27
) as Promise<Movie[]>;
28
29
30
-export function fetchMovie(title: string): Promise<MovieDetails> {
+export async function fetchMovie(title: string) {
31
console.log('fetchMovie', title);
32
return delay(200 + Math.floor(Math.random() * 2000), () => {
33
const result = movies.filter((item) => item.title === title);
0 commit comments