Skip to content

Commit

Permalink
refactor: for-of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Apr 10, 2024
1 parent a2efc69 commit ecd5563
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ export function scanEnums(options: ScanOptions): EnumData {
let lastInitialized: string | number | undefined
const members: Array<EnumMember> = []

for (let i = 0; i < decl.members.length; i++) {
const e = decl.members[i]
for (const e of decl.members) {
const key = e.id.type === 'Identifier' ? e.id.name : e.id.value
const fullKey = `${id}.${key}` as const
const saveValue = (value: string | number) => {
Expand Down

0 comments on commit ecd5563

Please sign in to comment.