mirror of
https://github.com/bendtherules/react-vis-gridarea.git
synced 2026-08-18 13:51:59 +00:00
Initial structure
Generated with node-typescript-webpack
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export class Greeter {
|
||||
private greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
public greet(): string {
|
||||
return `Bonjour, ${this.greeting}!`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Greeter } from './greeter';
|
||||
export * from './greeter';
|
||||
|
||||
// tslint:disable-next-line:only-arrow-functions
|
||||
(function(currentWindow: Window) {
|
||||
// execute when load index.js
|
||||
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('hello world');
|
||||
|
||||
// assign Greeter to global
|
||||
const myWindow = currentWindow as any;
|
||||
myWindow.Greeter = Greeter;
|
||||
// we can use Greeter , execute following in console
|
||||
// var greet = new Greeter('myName');
|
||||
// greet.greet();
|
||||
})(window);
|
||||
Reference in New Issue
Block a user