From c41228292a6fe84c48ddf73d68de6f27e3aff580 Mon Sep 17 00:00:00 2001 From: Charles Salmon Date: Thu, 28 Feb 2019 12:11:57 +1300 Subject: [PATCH] Improve documentation on `TabContent` type definitions, and order props in alignment with props declared in `TabContent.vue`. --- types/TabContent.ts | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/types/TabContent.ts b/types/TabContent.ts index 270db3e..cbd1ebd 100644 --- a/types/TabContent.ts +++ b/types/TabContent.ts @@ -1,16 +1,36 @@ import Vue from 'vue' export declare class Tab extends Vue { - /** Title to be displayed under each step */ - title?: string - /** css class for each step icon */ - icon?: string - /*** - * Function to execute before tab switch. Return value must be boolean - * If the return result is false, tab switch is restricted + /** + * Title to be displayed under each step. + * + * Default value: '' + */ + title: string + + /** CSS class to be applied to each step icon. + * + * Default value: '' + */ + icon: string + + /** + * Function to execute before changing tabs. If the return result is false, the tab switch is restricted. + */ + beforeChange: () => boolean | Promise + + /** + * Function to execute after changing tabs. It is safe to assume that necessary validation has already occurred. + */ + afterChange: () => void + + /** + * Vue router route object. */ - beforeChange (): boolean | Promise - /** Vue router route object */ route: string | object + + /** + * Default value: () => {} + */ additionalInfo: object }