Skip to content

Importing default module fails when using ES6 syntax #3337

@astoilkov

Description

@astoilkov

I have tried importing fs module using import fs from 'fs' but this gives an error: `Module 'path' has no default export.'.

import fs = require('fs'); works but this is not ES6 syntax. I would like to stick with ES6 syntax because it is getting more and more popular and therefore easier to understand.

Are there any plans for supporting ES6 modules that import the entire TypeScript module?

Metadata

Metadata

Assignees

No one assigned

    Labels

    By DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions