rikukissa / typehole

TypeScript development tool for Visual Studio Code that helps you automate creating the initial static typing for runtime values

Home Page:https://marketplace.visualstudio.com/items?itemName=rikurouvila.typehole

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2 typeholes in the same file can cause duplicate interface names

rikukissa opened this issue · comments

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);