-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
typings: `getT` now returns `TFunction` with the correct default namespace typings: `LocalePrefixKey`'s type now doesn't force a `commands/` prefix typings: `LocalePrefixKey` now uses i18next's `nsSeparator` type instead of a hardcoded `:` typings: All functions using `TypedT` now requires `LocalePrefixKey` BREAKING CHANGE: refactor: Removed `resolveKey`, use `getSupportedLanguageT(interaction)(...args)` instead BREAKING CHANGE: refactor: Removed `resolveUserKey`, use `getSupportedUserLanguageT(interaction)(...args)` instead BREAKING CHANGE: typings: Removed `T` type utility function BREAKING CHANGE: typings: Removed `FT` type utility function BREAKING CHANGE: typings: Removed `TypedT` type utility BREAKING CHANGE: typings: Removed `TypedFT` type utility BREAKING CHANGE: typings: Removed `Value` type utility BREAKING CHANGE: typings: Removed `Values` type utility BREAKING CHANGE: typings: Removed `Difference` type utility BREAKING CHANGE: typings: `i18next.TFunction` is not longer augmented, `lng` and `ns` is not longer assumed to exist
- Loading branch information
Showing
6 changed files
with
12 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,3 @@ | ||
export { default as i18next, type InitOptions, type TFunction, type TOptions, type TOptionsBase } from 'i18next'; | ||
export * from './lib/functions.js'; | ||
export * from './lib/registry.js'; | ||
export type * from './lib/types.js'; | ||
export * from './lib/utils.js'; | ||
|
||
import type { NonNullObject } from '@sapphire/utilities'; | ||
import type { TypedFT, TypedT } from './lib/types.js'; | ||
|
||
declare module 'i18next' { | ||
export interface TFunction { | ||
lng: string; | ||
ns?: string; | ||
|
||
<TReturn>(key: TypedT<TReturn>, options?: TOptionsBase | string): TReturn; | ||
<TReturn>(key: TypedT<TReturn>, defaultValue: TReturn, options?: TOptionsBase | string): TReturn; | ||
<TArgs extends NonNullObject, TReturn>(key: TypedFT<TArgs, TReturn>, options?: TOptions<TArgs>): TReturn; | ||
<TArgs extends NonNullObject, TReturn>(key: TypedFT<TArgs, TReturn>, defaultValue: TReturn, options?: TOptions<TArgs>): TReturn; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters