From 98f0eb4a7f5d6c608fcb29a4a3f2a53e2cf5a5f6 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: Tue, 7 Mar 2023 16:40:44 +0300 Subject: [PATCH] Update dynamic slot typing --- components/organizationchart/OrganizationChart.d.ts | 2 +- components/tree/Tree.d.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/components/organizationchart/OrganizationChart.d.ts b/components/organizationchart/OrganizationChart.d.ts index 70386f607..1d706b712 100755 --- a/components/organizationchart/OrganizationChart.d.ts +++ b/components/organizationchart/OrganizationChart.d.ts @@ -102,7 +102,7 @@ export interface OrganizationChartSlots { * Dynamic content template. * @todo */ - // [key: string](node: any): VNode[]; + [key: string]: (node: any) => VNode[]; } /** diff --git a/components/tree/Tree.d.ts b/components/tree/Tree.d.ts index c7c6f77df..50ad484ec 100755 --- a/components/tree/Tree.d.ts +++ b/components/tree/Tree.d.ts @@ -7,6 +7,7 @@ * @module tree * */ +import { VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; /** @@ -167,12 +168,12 @@ export interface TreeSlots { * Optional slots. * @todo */ - // [key: string](scope: { - /** - * Tree node instance - */ - // node: TreeNode; - // }):VNode[]; + [key: string]: (scope: { + /** + * Tree node instance + */ + node: TreeNode; + }) => VNode[]; } /**