mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
30 lines
625 B
TypeScript
30 lines
625 B
TypeScript
/// <reference path="vue.d.ts" />
|
|
module myapp {
|
|
"use strict";
|
|
export class Application extends Vue {
|
|
constructor() {
|
|
super();
|
|
Vue.config.debug = true;
|
|
this._init({
|
|
// data is necessary to always write in init()
|
|
data: {
|
|
text: "hello world."
|
|
// },
|
|
// methods : {
|
|
// action : this.action
|
|
/* same as unser */
|
|
}
|
|
});
|
|
this.methods = {
|
|
action: this.action
|
|
}
|
|
}
|
|
action(): void {
|
|
console.log("action");
|
|
}
|
|
}
|
|
}
|
|
|
|
var app = new myapp.Application();
|
|
app.$mount("#main");
|