From ef3b85f311f556ee632bd0a73ceed4368dca52cc Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 16 Oct 2024 16:11:08 +0800 Subject: [PATCH] fix type --- src/interface.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/interface.ts b/src/interface.ts index 5ebf886d..ccacc8cb 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -1,7 +1,13 @@ import type * as React from 'react'; -import type { SafeKey, Key, DataNode } from 'rc-tree/lib/interface'; +import type { SafeKey, Key, DataNode as TreeDataNode } from 'rc-tree/lib/interface'; -export type { SafeKey, Key, DataNode }; +export type { SafeKey, Key }; + +export interface DataNode extends Record, Omit { + key?: Key; + value?: SafeKey; + children?: DataNode[]; +} export type SelectSource = 'option' | 'selection' | 'input' | 'clear'; @@ -60,4 +66,5 @@ export interface FieldNames { value?: string; label?: string; children?: string; + _title?: string[]; }