Skip to content

Commit 366083f

Browse files
committed
fix: restore LocaleKeys property in EnumLocaleExtends
1 parent 107b70b commit 366083f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/extension.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ declare module 'enum-plus/extension' {
2424
*
2525
* **CN:** 枚举本地化文本的Key值,可以用来增强编辑器的智能提示
2626
*/
27-
// LocaleKeys: NonNullable<string>;
27+
LocaleKeys: NonNullable<string>;
2828
}
2929
}

src/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import type { EnumLocaleExtends } from 'enum-plus/extension';
22

33
export type { LocalizeInterface } from './localize-interface';
44

5-
// @ts-expect-error: because LocaleKeys is a user-defined type, so ignore the error here
6-
export type EnumItemLabel = EnumLocaleExtends['LocaleKeys'] & NonNullable<string>;
5+
export type EnumItemLabel = EnumLocaleExtends['LocaleKeys'];
76

87
// eslint-disable-next-line @typescript-eslint/no-explicit-any
98
export type EnumInit<K extends keyof any = string, V extends EnumValue = EnumValue> =

0 commit comments

Comments
 (0)