Skip to content

Commit d18e782

Browse files
authored
Merge pull request #1 from medchelios/fix/typescript-no-any-eslint
fix: replace 'any' type with proper TypeScript types to resolve ESLin…
2 parents b0503e8 + db92dd7 commit d18e782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/js/hooks/useLang.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export function useLang() {
3535

3636
function getValueFromKey(key: string): string | undefined {
3737
const segments = key.split('.')
38-
let current: any = lang
38+
let current: LangValue | undefined = lang
3939

4040
for (const segment of segments) {
4141
if (typeof current !== 'object' || current === null) return undefined
42-
current = current[segment]
42+
current = current[segment] as LangValue | undefined
4343
}
4444

4545
return typeof current === 'string' ? current : undefined

0 commit comments

Comments
 (0)