TypeScript Version:
2.4.2 / 2.5.2
Code
const getFoo = () => ({
foo: 'foo'
})
// broken: foo is missing in definitions
const { foo } = getFoo()
export { foo }
// workaround: foo is in definitions
export const { foo } = getFoo()
Expected behavior:
foo should exist in the generated definitions when destructured from a function and then exported separately.
Actual behavior:
foo is missing from the generated definitions when destructured from a function and then exported separately.