diff --git a/components/form/FormItem.tsx b/components/form/FormItem.tsx index 4c1db9aa29..036429e8ad 100644 --- a/components/form/FormItem.tsx +++ b/components/form/FormItem.tsx @@ -40,7 +40,7 @@ export interface FormItemProps fieldKey?: number; } -function FormItem(props: FormItemProps): React.ReactNode { +function FormItem(props: FormItemProps): React.ReactElement { const { name, fieldKey, @@ -98,7 +98,7 @@ function FormItem(props: FormItemProps): React.ReactNode { fieldId?: string, meta?: Meta, isRequired?: boolean, - ) { + ): any { if (noStyle) { return baseChildren; } diff --git a/components/form/__tests__/type.test.tsx b/components/form/__tests__/type.test.tsx new file mode 100644 index 0000000000..3f7146b386 --- /dev/null +++ b/components/form/__tests__/type.test.tsx @@ -0,0 +1,17 @@ +/* eslint-disable no-unused-expressions */ + +import * as React from 'react'; +import Form from '..'; +import Input from '../../input'; + +describe('Form.typescript', () => { + it('Form.Item', () => { +
+ + + +
; + }); +}); + +/* eslint-enable */