diff --git a/components/table/__tests__/type.test.tsx b/components/table/__tests__/type.test.tsx index 9a2856e11c..0b8c7360e6 100644 --- a/components/table/__tests__/type.test.tsx +++ b/components/table/__tests__/type.test.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import Table from '../Table'; +import { ColumnProps } from '..'; const { Column, ColumnGroup } = Table; @@ -27,4 +28,20 @@ describe('Table.typescript', () => { }); }); +describe('Table.typescript types', () => { + it('ColumnProps', () => { + interface User { + name: string; + } + + const columns: ColumnProps[] = [ + { + title: 'Name', + dataIndex: 'name', + }, + ]; + + expect(columns).toBeTruthy(); + }); +}); /* eslint-enable */ diff --git a/components/table/index.tsx b/components/table/index.tsx index b0a44c0c0c..51d5546008 100644 --- a/components/table/index.tsx +++ b/components/table/index.tsx @@ -1,5 +1,6 @@ import Table, { TableProps, TablePaginationConfig } from './Table'; +export { ColumnProps } from './Column'; export { ColumnsType, ColumnType, ColumnGroupType } from './interface'; export { TableProps, TablePaginationConfig };