Skip to content

Declaration emit fails to add visible alias statement for non-visible binding pattern #48868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Andarist opened this issue Apr 28, 2022 · 3 comments

Comments

@Andarist
Copy link
Contributor

Bug Report

πŸ”Ž Search Terms

declaration emit, object pattern, binding pattern, destructuring

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

function getFoo() {
  return { foo: { test: 42 } }
}

const { foo } = getFoo()

// Exported type alias 'AliasType' has or is using private name 'foo'. (4081)
export type AliasType = typeof foo

πŸ™ Actual behavior

.d.ts can't be emitted

πŸ™‚ Expected behavior

.d.ts should be emitted by adding a visible alias statement

@MartinJohns
Copy link
Contributor

Sounds like a duplicate of #30598.

@Andarist
Copy link
Contributor Author

Yep, you are right - your search skills are stronger than mine πŸ˜… gonna close this ticket then and reference the other in my fixing PR

@MartinJohns
Copy link
Contributor

your search skills are stronger than mine

I've got practice: https://github.com/Microsoft/TypeScript/issues?q=is%3Aissue+commenter%3AMartinJohns+%22duplicate+of%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants