fix: paramter type error (#24429)

* fix: paramter type error

* feat: adjust

* feat: add type.test.tsx
This commit is contained in:
zoomdong 2020-06-05 17:41:25 +08:00 committed by GitHub
parent 8e00e59f56
commit 37e9c6b111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -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;
}

View 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();
});
});