typehole
typehole copied to clipboard
2 typeholes in the same file can cause duplicate interface names
Not a huge issue in this example as the interfaces are identical and the second one is merged with the first.
interface Bar {
number: number;
title: string;
duration: number;
audio_file: IAudioFile;
published_at: string;
long_description: string;
}
interface IAudioFile {
url: string;
}
interface AutoDiscovered {
number: number;
title: string;
duration: number;
audio_file: IAudioFile;
published_at: string;
long_description: string;
}
interface IAudioFile {
url: string;
}
export default function Episode(episode: Episode) {
const foo: Bar = typehole.t1(episode);
const bar: AutoDiscovered = typehole.t2(episode);