Skip to content

export binding destructuring downleveling changes runtime semantics #35905

Closed
@ajafff

Description

@ajafff

TypeScript Version: 3.7.2

Search Terms: export destructuring

Code

// @target: esnext
// @module: commonjs
let foo = 1;
export { foo };

console.log({ foo } = {foo : 1});

Expected behavior:

Logs: {foo: 1}

Actual behavior:
Logs: `1

Playground Link: https://www.typescriptlang.org/play/?module=1&ssl=4&ssc=33&pln=1&pc=1#code/DYUwLgBAZg9jEF4IEYDcAoEAPADjATpAN7RwQC+G6AxjAHYDOMoAdMDAOYAUJs85iCET4QAXCnIBKIA

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions