Skip to content

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

Closed
@Andarist

Description

@Andarist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions