Skip to content

Commit

Permalink
feat: add readonly modifier for antd table columns type
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiangmoe committed Apr 4, 2022
1 parent 6776bb8 commit 681295f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/table/__tests__/type.test.tsx
Expand Up @@ -44,7 +44,7 @@ describe('Table.typescript types', () => {
name: string;
}

const columns: ColumnProps<User>[] = [
const columns: readonly ColumnProps<User>[] = [
{
title: 'Name',
dataIndex: 'name',
Expand Down
2 changes: 1 addition & 1 deletion components/table/interface.tsx
Expand Up @@ -126,7 +126,7 @@ export interface ColumnGroupType<RecordType> extends Omit<ColumnType<RecordType>
children: ColumnsType<RecordType>;
}

export type ColumnsType<RecordType = unknown> = (
export type ColumnsType<RecordType = unknown> = readonly (
| ColumnGroupType<RecordType>
| ColumnType<RecordType>
)[];
Expand Down

0 comments on commit 681295f

Please sign in to comment.