mirror of
https://github.com/bendtherules/react-vis-gridarea.git
synced 2026-08-18 13:51:59 +00:00
Expose GridArea from index
This commit is contained in:
+6
-6
@@ -1,5 +1,5 @@
|
|||||||
import { Greeter } from './greeter';
|
import GridArea from './grid-area';
|
||||||
export * from './greeter';
|
export default GridArea;
|
||||||
|
|
||||||
// tslint:disable-next-line:only-arrow-functions
|
// tslint:disable-next-line:only-arrow-functions
|
||||||
(function(currentWindow: Window) {
|
(function(currentWindow: Window) {
|
||||||
@@ -8,10 +8,10 @@ export * from './greeter';
|
|||||||
// tslint:disable-next-line:no-console
|
// tslint:disable-next-line:no-console
|
||||||
console.log('hello world');
|
console.log('hello world');
|
||||||
|
|
||||||
// assign Greeter to global
|
// assign GridArea to global
|
||||||
const myWindow = currentWindow as any;
|
const myWindow = currentWindow as any;
|
||||||
myWindow.Greeter = Greeter;
|
myWindow.GridArea = GridArea;
|
||||||
// we can use Greeter , execute following in console
|
// we can use GridArea , execute following in console
|
||||||
// var greet = new Greeter('myName');
|
// var greet = new GridArea('myName');
|
||||||
// greet.greet();
|
// greet.greet();
|
||||||
})(window);
|
})(window);
|
||||||
|
|||||||
Reference in New Issue
Block a user