docs: annotation

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-01-19 02:10:33 +09:00
parent 8fab8630ad
commit 29e5f68d17
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
1 changed files with 3 additions and 2 deletions

View File

@ -69,8 +69,9 @@ export class I18n<T extends ILocale> {
return this.locale as Ts<T>;
}
// string にしているのは、ドット区切りでのパス指定を許可するため
// なるべくこのメソッド使うよりもlocale直接参照の方がvueのキャッシュ効いてパフォーマンスが良いかも
/**
* @deprecated 使 locale vue
*/
public t<TKey extends FlattenKeys<T, string>>(key: TKey): string;
public t<TKey extends FlattenKeys<T, ParameterizedString<string>>>(key: TKey, args: { readonly [_ in ParametersOf<T, TKey>]: string | number }): string;
public t(key: string, args?: { readonly [_: string]: string | number }) {