Skip to content

Commit 77ddf8d

Browse files
committed
feat: code improvements
1 parent 6c7c385 commit 77ddf8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/enum-item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class EnumItemClass<
3131
*
3232
* **CN:** 布尔值,表示这是一个枚举项实例
3333
*/
34-
[ENUM_ITEM] = true;
34+
readonly [ENUM_ITEM] = true;
3535

3636
#localize: NonNullable<EnumItemOptions['localize']>;
3737
#localizedProxy = new Proxy(this, {

src/enum-values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class EnumItemsArray<
6868
*
6969
* **CN:** 布尔值,表示这是一个枚举项数组
7070
*/
71-
[ENUM_ITEMS] = true;
71+
readonly [ENUM_ITEMS] = true;
7272

7373
label(keyOrValue?: string | number): string | undefined {
7474
// First find by value, then find by key

0 commit comments

Comments
 (0)