TypeScript/tests/cases/compiler/esModuleInteropWithExportStar.ts
Wesley Wigham 65e7acce58
Use getters to define live export bindings refresh (#35967)
* use getters to define live export bindings

* fix scoping in export* helper

* Object.defineProperty cannot be used in ES3 target

* Accept changed baselines

* Use function expression, not arrow function

* Update importStarHelper to match export helper in binding-making

* Fix whitespace

* Adjust whitespace in edited helpers

* Use new helper for setting bindings, use unscoped __exportStar helper for exports so helpers get reused more

* Accept updated baselines

* Use __createBinding for individual reexports when target is es3

* Remove unneeded type assertion

* Singeline the helpers

* Add check for createBinding helper, accept updated baselines with shortened helper

Co-authored-by: Michael Rawlings <mirawlings@ebay.com>
2020-02-24 15:36:14 -08:00

13 lines
235 B
TypeScript

// @esModuleInterop: true
// @target: es3,es5
// @filename: fs.d.ts
export const x: number;
// @filename: mjts.ts
import * as fs from "./fs";
fs;
export * from "./fs";
export {x} from "./fs";
export {x as y} from "./fs";