Skip to content

Commit b0ff856

Browse files
committed
fix(枚举): 修正 Status.descriptions 类型定义
- 调整枚举类型结构,增加 value、label、level 字段 - 确保 key 类型为 'Pending' | 'Approved' - 更新断言类型以匹配实际枚举结构
1 parent 40b8d0f commit b0ff856

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/utils-core/test/dict.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('枚举定义测试', () => {
1818
Pending: { readonly value: 0; readonly label: '待处理'; level: 11 };
1919
Approved: { readonly value: 1; readonly label: '已批准'; level: 22 };
2020
}>(Status.definition);
21-
assertType<{ label: string; key: 'Pending' | 'Approved' }[]>(Status.descriptions);
21+
assertType<{ value: 0 | 1; label: string; level: number; key: 'Pending' | 'Approved' }[]>(Status.descriptions);
2222

2323
assertType<['Pending', 'Approved']>(Status.keys);
2424
assertType<2>(Status.length);

0 commit comments

Comments
 (0)