You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
463 B
18 lines
463 B
import type {
|
|
TmdbMovieResult,
|
|
TmdbTvResult,
|
|
TmdbPersonResult,
|
|
} from '../api/themoviedb';
|
|
|
|
export const isMovie = (
|
|
movie: TmdbMovieResult | TmdbTvResult | TmdbPersonResult
|
|
): movie is TmdbMovieResult => {
|
|
return (movie as TmdbMovieResult).title !== undefined;
|
|
};
|
|
|
|
export const isPerson = (
|
|
person: TmdbMovieResult | TmdbTvResult | TmdbPersonResult
|
|
): person is TmdbPersonResult => {
|
|
return (person as TmdbPersonResult).known_for !== undefined;
|
|
};
|