typescript1.5 - TypeScript destructuring alias import? -
i use namespaces/modules application. have large application broken several smaller "modules". compiled together, have references @ times. if need access module x.y
module z
can using x.y
. howevever, don't want keep referencing x
. there anyway can destructure x
aliased names? example (this doesn't work, hence question):
import {y,a,b} = x;
instead of:
import y = x.y; import = x.a; import b = x.b;
is there similar can simplify import aliasing of internal modules?
is there similar can simplify import aliasing of internal module
if members of module importing not modules (or type) import
not work. use var
instead:
module x{ // stuff } var {y,a,b} = x;
Comments
Post a Comment