Answer the question
In order to leave comments, you need to log in
How to extend a type inside a TypeScript interface?
There is an interface of this kind
export interface IGetMovies {
page: number;
results: {
poster_path: string | null;
adult: boolean;
overview:string;
release_date: string;
genre_ids: number[];
id: number;
original_title: string;
original_language:string;
title:string;
backdrop_path:string | null;
popularity: number;
vote_count: number;
video: boolean;
vote_average: number;
}[];
total_results: number;
total_pages: number;
}
How can one extend the results type inside this interface, i.e. add new lines to IGetMovies -> results.
Is it possible to do this without putting results in a separate interface?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question