From fd632dad19cce6bd27ef0432f175f6a839cc0845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 13 Jul 2023 10:52:17 +0300 Subject: [PATCH] Update Timeline.d.ts --- components/lib/timeline/Timeline.d.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/components/lib/timeline/Timeline.d.ts b/components/lib/timeline/Timeline.d.ts index 4b13a4d87..411d8fe3d 100644 --- a/components/lib/timeline/Timeline.d.ts +++ b/components/lib/timeline/Timeline.d.ts @@ -10,7 +10,16 @@ import { VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -export declare type TimelinePassThroughOptionType = TimelinePassThroughAttributes | null | undefined; +export declare type TimelinePassThroughOptionType = TimelinePassThroughAttributes | ((options: TimelinePassThroughMethodOptions) => TimelinePassThroughAttributes | string) | string | null | undefined; + +/** + * Custom passthrough(pt) option method. + */ +export interface TimelinePassThroughMethodOptions { + instance: any; + props: TimelineProps; + context: TimelineContext; +} /** * Custom passthrough(pt) options. @@ -59,6 +68,16 @@ export interface TimelinePassThroughAttributes { [key: string]: any; } +/** + * Defines current options in Timeline component. + */ +export interface TimelineContext { + /** + * Current index of the item as a number. + */ + index: number; +} + /** * Defines valid properties in Timeline component. */