Skip to content

"default" property exported with "export=" cannot be imported as default #7287

Closed

Description

Given the below module definition:

var foo = {
    a: "test",
    "default": 42
};
export = foo;

The below fails to import the default property (as name def), stating that the module "has no default property".

import def, {a} from "./mod1"
a.toString();

Note however the below works fine:

import {default as def, a} from "./mod1"
a.toString();

This is (loosely) related to #7248, and I have a fix in testing.

Activity

  1. added
    Fixed
    on Jun 20, 2016
  2. billti commented on Jun 20, 2016

    @billti
    MemberAuthor

    Verified in latest 'master' bits that this is working for JS & TS now.

  3. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions