Check exported bindings are defined (#9589)
* Check exported bindings are defined * Add tests * Update flow whitelist * Add tests for builtins
This commit is contained in:
@@ -1 +1,2 @@
|
||||
export {foo, bar};
|
||||
var foo, bar;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
|
||||
_export({
|
||||
foo: void 0,
|
||||
bar: void 0
|
||||
});
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export {foo as bar};
|
||||
var foo;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo;
|
||||
|
||||
_export("foo", void 0);
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("bar", foo);
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export {foo as default};
|
||||
var foo;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo;
|
||||
|
||||
_export("foo", void 0);
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("default", foo);
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export {foo as default, bar};
|
||||
var foo, bar;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
|
||||
_export({
|
||||
foo: void 0,
|
||||
bar: void 0
|
||||
});
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("default", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export {foo};
|
||||
var foo;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo;
|
||||
|
||||
_export("foo", void 0);
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("foo", foo);
|
||||
}
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as foo2 from "foo";
|
||||
import {bar} from "foo";
|
||||
import {foo as bar2} from "foo";
|
||||
|
||||
export {test};
|
||||
export {foo};
|
||||
export var test2 = 5;
|
||||
|
||||
export default test;
|
||||
export default foo;
|
||||
|
||||
@@ -10,11 +10,11 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export, _c
|
||||
bar2 = _foo.foo;
|
||||
}, function (_fooBar) {}, function (_directoryFooBar) {}],
|
||||
execute: function () {
|
||||
_export("test", test);
|
||||
_export("foo", foo);
|
||||
|
||||
_export("test2", test2 = 5);
|
||||
|
||||
_export("default", test);
|
||||
_export("default", foo);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user