feat(transiler/dart): re-export imported vars
``` import {Foo} from ‘./foo’; var localVar = true; export {Foo, localVar}; ===> import ‘./foo’ show Foo; export ‘./foo’ show Foo; var localVar = true; ``` Closes #41
This commit is contained in:
1
tools/transpiler/spec/baz.js
Normal file
1
tools/transpiler/spec/baz.js
Normal file
@ -0,0 +1 @@
|
||||
export var Baz = 'BAZ';
|
@ -9,8 +9,14 @@ import * as exportModule from './export';
|
||||
|
||||
import {Type} from 'facade/lang';
|
||||
|
||||
import {Baz} from './reexport';
|
||||
|
||||
export function main() {
|
||||
describe('imports', function() {
|
||||
it('should re-export imported vars', function() {
|
||||
expect(Baz).toBe('BAZ');
|
||||
});
|
||||
|
||||
it('should work', function() {
|
||||
expect(Foo).toBe('FOO');
|
||||
expect(Bar).toBe('BAR');
|
||||
|
10
tools/transpiler/spec/reexport.js
Normal file
10
tools/transpiler/spec/reexport.js
Normal file
@ -0,0 +1,10 @@
|
||||
import {Baz} from './baz';
|
||||
import {Bar1} from './bar';
|
||||
|
||||
var localVar = true;
|
||||
|
||||
export {Baz, localVar, Bar1};
|
||||
|
||||
// Will become:
|
||||
// export {Baz} from './baz';
|
||||
// export {Bar1} from './bar';
|
Reference in New Issue
Block a user