Bruno Predot

Création MovieInterface

... ... @@ -4,22 +4,13 @@ import SearchBar from "~/components/SearchBar.vue";
import { ref } from "vue";
import { useTMDB } from "~/composables/tMDB";
import { Movie } from "~/models/movie";
import type { MovieInterface } from "~/interfaces/movie";
//#endregion
//#region --Declaration--.
const { fetchPopularMovies } = useTMDB();
//#endregion
//#region --Type--.
// interface Movie {
// id: number;
// title: string;
// poster_path: string | null;
// vote_average: number;
// release_date: string;
// }
//#endregion
//#region --Data/refs--.
const isInitialLoading = ref(true);
const isLoadingMore = ref(false);
... ... @@ -29,7 +20,7 @@ const totalPages = ref(0);
//#region --Computed--.
const movies = computed(() => {
return useRepo(Movie).all();
return useRepo(Movie).all() as unknown as MovieInterface[];
});
//#endregion
... ...
export interface MovieInterface {
id: number;
title: string;
poster_path: string | null;
vote_average: number;
release_date: string;
}
\ No newline at end of file
... ...