Within my application, I have a Class model that is defined with a constructor. Here is an example:
export class Movie {
title: string;
posterURL: string;
description: string;
public constructor(cfg: Partial<Movie>) {
Object.assign(this, cfg);
}
getEndDate(): Date {
return new Date();
}
};
Additionally, I have an HTTP request that utilizes this model
getMoviesData(): Observable<Movie[]> {
return this.http.get<Movie[]>(`http://localhost:3544/movies`)
}
As anticipated, there seems to be an issue
What steps can I take to resolve this matter? Do I need to create an interface as well?
Thank you for your assistance :)