Rich-Harris / dts-buddy

WORK IN PROGRESS DO NOT USE
MIT License
317 stars 12 forks source link

Fix exports #82

Closed Rich-Harris closed 4 months ago

Rich-Harris commented 4 months ago

It turns out that these are not equivalent:

declare module 'x' {
  type a = {...};
  export type b = {...};
}
declare module 'x' {
  type a = {...};
  type b = {...};

  export { b };
}

In the first case, everything is exported. There is no universe in which this makes sense. Happily, we can use the second form to get the correct behaviour.