Skip to content

Commit ef3b85f

Browse files
committed
fix type
1 parent f44d6d9 commit ef3b85f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/interface.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import type * as React from 'react';
2-
import type { SafeKey, Key, DataNode } from 'rc-tree/lib/interface';
2+
import type { SafeKey, Key, DataNode as TreeDataNode } from 'rc-tree/lib/interface';
33

4-
export type { SafeKey, Key, DataNode };
4+
export type { SafeKey, Key };
5+
6+
export interface DataNode extends Record<string, any>, Omit<TreeDataNode, 'key' | 'children'> {
7+
key?: Key;
8+
value?: SafeKey;
9+
children?: DataNode[];
10+
}
511

612
export type SelectSource = 'option' | 'selection' | 'input' | 'clear';
713

@@ -60,4 +66,5 @@ export interface FieldNames {
6066
value?: string;
6167
label?: string;
6268
children?: string;
69+
_title?: string[];
6370
}

0 commit comments

Comments
 (0)