mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
fix: paramter type error (#24429)
* fix: paramter type error * feat: adjust * feat: add type.test.tsx
This commit is contained in:
parent
8e00e59f56
commit
37e9c6b111
@ -41,7 +41,7 @@ export interface AntTreeNodeProps {
|
||||
selected?: boolean;
|
||||
selectable?: boolean;
|
||||
icon?: ((treeNode: AntdTreeNodeAttribute) => React.ReactNode) | React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
children?: React.ReactElement[];
|
||||
[customProp: string]: any;
|
||||
}
|
||||
|
||||
|
13
components/tree/__tests__/type.test.tsx
Normal file
13
components/tree/__tests__/type.test.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
/* eslint-disable */
|
||||
import * as React from 'react';
|
||||
import { AntTreeNodeProps } from '../Tree';
|
||||
|
||||
describe('Tree TypeScript Test', async () => {
|
||||
it('AntTreeNodeProps', () => {
|
||||
const tree: AntTreeNodeProps = {
|
||||
children: [React.createElement('h1')],
|
||||
};
|
||||
|
||||
expect(tree).toBeTruthy();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user