i18n-keyless-core 1.5.3 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.ts +3 -2
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -144,14 +144,15 @@ interface TranslationStoreState {
144
144
  }
145
145
  interface TranslationStoreActions {
146
146
  _hydrate: () => Promise<void>;
147
- getTranslation: (text: string) => string | undefined;
147
+ getTranslation: (text: string, context?: string, debug?: boolean) => string | undefined;
148
148
  setTranslations: (translations: Translations) => void;
149
- translateKey: (key: string) => void;
149
+ translateKey: (key: string, context?: string, debug?: boolean) => void;
150
150
  setLanguage: (lang: Lang) => void;
151
151
  }
152
152
  export type TranslationStore = TranslationStoreState & TranslationStoreActions;
153
153
  export interface I18nKeylessRequestBody {
154
154
  key: string;
155
+ context?: string;
155
156
  languages: I18nConfig["languages"]["supported"];
156
157
  primaryLanguage: I18nConfig["languages"]["primary"];
157
158
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "i18n-keyless-core",
3
3
  "private": false,
4
- "version": "1.5.3",
4
+ "version": "1.6.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",