mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-07 10:40:13 +00:00
Merge pull request #34001 from lloiser/ll-counterpart
[counterpart] add translate method
This commit is contained in:
@@ -2,6 +2,8 @@ import * as counterpart from 'counterpart';
|
||||
|
||||
counterpart('translation.to.be.used');
|
||||
counterpart(['translation', 'to', 'be', 'used']);
|
||||
counterpart.translate('translation.to.be.used');
|
||||
counterpart.translate(['translation', 'to', 'be', 'used']);
|
||||
|
||||
counterpart.setSeparator('*');
|
||||
|
||||
|
||||
1
types/counterpart/index.d.ts
vendored
1
types/counterpart/index.d.ts
vendored
@@ -9,6 +9,7 @@ type LocaleChangeHandler = (newLocale: string, oldLocale: string) => void;
|
||||
|
||||
interface Counterpart {
|
||||
(key: string|string[], options?: object): string;
|
||||
translate(key: string|string[], options?: object): string;
|
||||
|
||||
setSeparator(value: string): string;
|
||||
onTranslationNotFound(callback: NotFoundHandler): void;
|
||||
|
||||
Reference in New Issue
Block a user