Replies: 2 comments
-
That doesn't seem like that much of an improvement over: import { name, age } from './person';
export const person = { name, age } especially since creating the object would have to sever the live bindings, and i expect an export-from syntax to preserve live bindings. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems module declaration proposal might give us a workaround: module m { export { name, age } from './person' }
import * as person from m
console.log(person.name, person.age); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
有时希望按需选择一些需要导出的元素,并以集合的方式导出。
期待的语法:
现在由于没有这样的语法,所以只能无奈将需要按需导出的元素单独拆分到一个文件里。
Beta Was this translation helpful? Give feedback.
All reactions