Skip to content

Export is not defined error for TSImportEqualsDeclaration #10042

@jaejun-choi

Description

@jaejun-choi

Bug Report

Current Behavior
syntax error

Input Code

import foo = require('f');
export { foo } // Export 'foo' is not defined

Expected behavior/code
no error

Babel Configuration (.babelrc, package.json, cli command)
typescript plugin

Environment

  • Babel version(s): 7.4.5
  • Node/npm version: Node 11.13 / npm 6.7

Possible Solution
In tsParseImportEqualsDeclaration()
call checkLVal() or scope.declareName()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRarea: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions