Skip to content

Preserve module marker in es2015+ module emit for tool compatibility - #38712

Merged
Wesley Wigham (weswigham) merged 1 commit into
microsoft:masterfrom
weswigham:preserve-module-marker
May 21, 2020
Merged

Preserve module marker in es2015+ module emit for tool compatibility#38712
Wesley Wigham (weswigham) merged 1 commit into
microsoft:masterfrom
weswigham:preserve-module-marker

Conversation

@weswigham

Copy link
Copy Markdown
Member

Fixes #38696

@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented May 21, 2020

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2020

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at 1378ebb. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2020

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/74637/artifacts?artifactName=tgz&fileId=42746E9DAEFBC3099CB30BC33DA3823DF5EA3ED9F2D869F5535525282926118D02&fileName=/typescript-4.0.0-insiders.20200521.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

@weswigham
Wesley Wigham (weswigham) merged commit 0018b8f into microsoft:master May 21, 2020
@weswigham

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) cherry-pick this into release-3.9

@typescript-bot

TypeScript Bot (typescript-bot) commented May 21, 2020

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the task to cherry-pick this into release-3.9 on this PR at 1378ebb. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Wesley Wigham (@weswigham), I've opened #38717 for you.

TypeScript Bot (typescript-bot) pushed a commit to typescript-bot/TypeScript that referenced this pull request May 21, 2020
Component commits:
1378ebb Preserve module marker in es2015+ module emit for tool compatability
AllenLee (cangSDARM) added a commit to cangSDARM/TypeScript that referenced this pull request May 26, 2020
* upstream/master:
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  Fix relation between generic mapped types and types with index signatures (microsoft#38761)
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  Revert "Wrap classes with decorators or static properties in an IIFE, even for ES2015+ (microsoft#32011)"
  Preserve module marker in es2015+ module emit for tool compatability (microsoft#38712)
  Fix recently added test so it is cross-plat
  fix(33286): add outlining for arrow function with one parameter (microsoft#38631)
  fix(38463): show completions for index access properties
@WORMSS

Copy link
Copy Markdown

How do I get Typescript to NOT keep the empty export code?
It breaks the ability to compile code with no exports and have it run in the browser.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider emitting export {} in all ambiguous module output

5 participants