Skip to content

"import type { X }" with exported value with same name gives "Individual declarations in merged declaration 'X' must be all exported or all local." #50880

@mb21

Description

@mb21

Bug Report

🔎 Search Terms

  • Individual declarations in merged declaration 'X' must be all exported or all local.
  • import type

🕗 Version & Regression Information

  • This is the behavior in every version I tried, the latest being 4.8.3, and I reviewed the FAQ for entries.

⏯ Playground Link

cannot import other files in playground

💻 Code

import type { x } from './foo';

export const x = 7

🙁 Actual behavior

Running tsc gives:

Individual declarations in merged declaration 'x' must be all exported or all local.

🙂 Expected behavior

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions