We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 296fc84 commit 4e4e639Copy full SHA for 4e4e639
.changeset/chilly-tigers-bathe.md
@@ -0,0 +1,5 @@
1
+---
2
+'@scaleway/use-i18n': patch
3
4
+
5
+Fix OOM when running eslint
packages/use-i18n/src/types.ts
@@ -3,11 +3,16 @@ import type {
LocaleKeys,
LocaleValue,
Params,
6
- ScopedValue,
7
Scopes,
8
} from 'international-types'
9
import type { ReactNode } from 'react'
10
+export type ScopedValue<
11
+ Locale extends BaseLocale,
12
+ Scope extends Scopes<Locale> | undefined,
13
+ Key extends LocaleKeys<Locale, Scope>,
14
+> = Scope extends undefined ? Locale[Key] : Locale[`${Scope}.${Key}`]
15
16
export type ReactParamsObject<Value extends LocaleValue> = Record<
17
Params<Value>[number],
18
LocaleValue | ReactNode
0 commit comments