mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 01:13:58 +08:00
fix: table export ColumnProps
(#21321)
This commit is contained in:
parent
4192c1f6d9
commit
297c3961ea
@ -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<User>[] = [
|
||||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
];
|
||||
|
||||
expect(columns).toBeTruthy();
|
||||
});
|
||||
});
|
||||
/* eslint-enable */
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Table, { TableProps, TablePaginationConfig } from './Table';
|
||||
|
||||
export { ColumnProps } from './Column';
|
||||
export { ColumnsType, ColumnType, ColumnGroupType } from './interface';
|
||||
export { TableProps, TablePaginationConfig };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user