Skip to content

Auto-importing modules as namespaces? #23830

Closed
@rauschma

Description

@rauschma

I’m not sure what the best way is to fix this, but: auto-importing is incredibly helpful. Alas, it only works for named exports. However, imports such as the following are frequent in Node.js and there, you get no help:

import * as path from 'path';

Possible solution: offer an auto-import if:

  • there is an unknown foo followed by a dot and
  • foo is the base name of a module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionDomain: Completion ListsThe issue relates to showing completion lists in an editorDomain: Quick FixesEditor-provided fixes, often called code actions.SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions