mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
38 lines
427 B
TypeScript
38 lines
427 B
TypeScript
|
|
|
|
class User extends Giraffe.Model {
|
|
}
|
|
|
|
class MainView extends Giraffe.View<User> {
|
|
|
|
constructor(options?) {
|
|
super(options);
|
|
this.appEvents = {
|
|
'startup': 'app_onStartup'
|
|
}
|
|
}
|
|
|
|
app_onStartup() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class MyApp extends Giraffe.App {
|
|
constructor() {
|
|
super();
|
|
this.routes= {
|
|
'': 'home'
|
|
}
|
|
}
|
|
|
|
home() {
|
|
this.attach(new MainView);
|
|
}
|
|
|
|
}
|
|
|
|
var app= new MyApp();
|
|
|
|
app.start();
|