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. */