Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Better errors for non-exported types #29624

Copy link
Copy link
@DanielRosenwasser

Description

@DanielRosenwasser
Issue body actions
// @filename a.ts

declare function foo(): any

declare function bar(): any;

export { bar };

// @filename b.ts

import { foo, bar } from "./a";

Currently we provide the following error messages:

Module '"./a"' has no exported member 'foo'.
Module '"./a"' has no exported member 'bar'.

We could instead provide the errors:

Module '"./a"' declares 'foo' locally, but it is not exported.
Module '"./a"' declares 'bar' locally', but it is exported as 'baz'.

Also using the

'{0}' is declared here.

related span.

Later on, we could provide quick fixes to respectively

  • Export foo from ./a.
  • Correct the usage of bar to baz.
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.