Given
interface foo {
title: string;
date: number;
}
Is it feasible to create an interface bar{}
that only includes the property title: string
, while being referenced within the foo{}
interface? In other words, if the title
is removed from foo{}
, should there be a compilation error for bar{}
until the title
is also eliminated?
An alternative approach could involve initially defining bar{}
and then having foo{}
extend it.