microsoft / microsoft/TypeScript

const module = {}; export = module

Open
#31,459 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: JS Emit
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version: 3.4.0-dev.201xxxxx

Search Terms:

Code

const module = {

}

export = module

Expected behavior:

const module_1 = {};
module.exports = module_1;

Actual behavior:

const module = {};
module.exports = module;

Playground Link:

Related Issues:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named in the issue. Start by reproducing the TypeScript snippet with the reported compiler version and compare the emitted JavaScript with the expected output. Done means the local variable is renamed consistently while the export continues to reference it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.