diff --git a/types/tinajs__tina/index.d.ts b/types/tinajs__tina/index.d.ts index 3ffca83574..c8c4d213f9 100644 --- a/types/tinajs__tina/index.d.ts +++ b/types/tinajs__tina/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for @tinajs/tina 1.4 // Project: https://github.com/tinajs/tina, https://tina.js.org // Definitions by: Jiayu Liu +// Strange Fish // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tinajs__tina // TypeScript Version: 2.2 @@ -22,7 +23,7 @@ export interface ComponentDefinitions extends ComponentLifecycles { properties: ComponentProperties; data: { [key: string]: any }; compute: (data: { [key: string]: any }) => { [key: string]: any }; - methods: { [name: string]: (this: Component) => any }; + methods: { [name: string]: (this: Component, ...args: any[]) => any }; mixins: Array>; } @@ -35,7 +36,7 @@ export class Component { export interface PageHooks { beforeLoad: (this: Page) => void; - onLoad: (this: Page) => void; + onLoad: (this: Page, options?: any) => void; onReady: (this: Page) => void; onShow: (this: Page) => void; onHide: (this: Page) => void; diff --git a/types/tinajs__tina/tinajs__tina-tests.ts b/types/tinajs__tina/tinajs__tina-tests.ts index 3f3fad874f..0149ca8fd4 100644 --- a/types/tinajs__tina/tinajs__tina-tests.ts +++ b/types/tinajs__tina/tinajs__tina-tests.ts @@ -46,7 +46,7 @@ Page.define({ this.data.count; }, methods: { - handleTapButton() { + handleTapButton(event) { this.data.count; } }