@tolgee/core 5.0.0-rc.9be0f0e.0 → 5.0.0
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.
- package/README.md +174 -0
- package/README.njk.md +61 -0
- package/dist/tolgee.cjs.js +723 -351
- package/dist/tolgee.cjs.js.map +1 -1
- package/dist/tolgee.cjs.min.js +1 -1
- package/dist/tolgee.cjs.min.js.map +1 -1
- package/dist/{tolgee.esm.mjs → tolgee.esm.js} +722 -346
- package/dist/tolgee.esm.js.map +1 -0
- package/dist/tolgee.esm.min.mjs +1 -1
- package/dist/tolgee.esm.min.mjs.map +1 -1
- package/dist/tolgee.umd.js +723 -351
- package/dist/tolgee.umd.js.map +1 -1
- package/dist/tolgee.umd.min.js +1 -1
- package/dist/tolgee.umd.min.js.map +1 -1
- package/lib/Controller/Cache/Cache.d.ts +10 -9
- package/lib/Controller/Controller.d.ts +104 -45
- package/lib/Controller/Events/EventEmitter.d.ts +6 -0
- package/lib/Controller/Events/EventEmitterSelective.d.ts +7 -0
- package/lib/Controller/Events/Events.d.ts +14 -0
- package/lib/Controller/Plugins/Plugins.d.ts +12 -25
- package/lib/Controller/State/State.d.ts +27 -9
- package/lib/Controller/State/initState.d.ts +46 -15
- package/lib/Controller/State/observerOptions.d.ts +41 -0
- package/lib/Controller/ValueObserver.d.ts +5 -5
- package/lib/FormatSimple/FormatError.d.ts +7 -0
- package/lib/FormatSimple/FormatSimple.d.ts +2 -0
- package/lib/FormatSimple/formatParser.d.ts +1 -0
- package/lib/FormatSimple/formatter.d.ts +2 -0
- package/lib/TolgeeCore.d.ts +204 -0
- package/lib/TranslateParams.d.ts +1 -1
- package/lib/helpers.d.ts +8 -0
- package/lib/index.d.ts +4 -4
- package/lib/types/cache.d.ts +25 -0
- package/lib/types/events.d.ts +66 -0
- package/lib/types/general.d.ts +34 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/plugin.d.ts +127 -0
- package/package.json +5 -4
- package/src/Controller/Cache/Cache.ts +31 -31
- package/src/Controller/Cache/helpers.ts +6 -6
- package/src/Controller/Controller.ts +78 -50
- package/src/Controller/Events/EventEmitter.ts +34 -0
- package/src/Controller/Events/EventEmitterSelective.test.ts +110 -0
- package/src/Controller/Events/EventEmitterSelective.ts +132 -0
- package/src/Controller/Events/Events.ts +69 -0
- package/src/Controller/Plugins/Plugins.ts +182 -133
- package/src/Controller/State/State.ts +43 -26
- package/src/Controller/State/initState.ts +97 -25
- package/src/Controller/State/observerOptions.ts +66 -0
- package/src/Controller/ValueObserver.ts +5 -2
- package/src/FormatSimple/FormatError.ts +26 -0
- package/src/FormatSimple/FormatSimple.ts +13 -0
- package/src/FormatSimple/formatParser.ts +133 -0
- package/src/FormatSimple/formatter.test.ts +190 -0
- package/src/FormatSimple/formatter.ts +19 -0
- package/src/TolgeeCore.ts +267 -0
- package/src/TranslateParams.test.ts +9 -12
- package/src/TranslateParams.ts +6 -5
- package/src/__test/backend.test.ts +6 -6
- package/src/__test/cache.test.ts +190 -0
- package/src/__test/client.test.ts +2 -2
- package/src/__test/events.test.ts +32 -7
- package/src/__test/format.simple.test.ts +14 -0
- package/src/__test/formatError.test.ts +61 -0
- package/src/__test/initialization.test.ts +15 -3
- package/src/__test/languageDetection.test.ts +14 -8
- package/src/__test/languageStorage.test.ts +10 -11
- package/src/__test/languages.test.ts +30 -6
- package/src/__test/loading.test.ts +2 -2
- package/src/__test/{namespacesFallback.test.ts → namespaces.fallback.test.ts} +10 -8
- package/src/__test/namespaces.test.ts +30 -7
- package/src/__test/options.test.ts +64 -0
- package/src/__test/plugins.test.ts +29 -18
- package/src/helpers.ts +53 -0
- package/src/index.ts +4 -10
- package/src/types/cache.ts +37 -0
- package/src/types/events.ts +85 -0
- package/src/types/general.ts +50 -0
- package/src/types/index.ts +19 -0
- package/src/types/plugin.ts +181 -0
- package/dist/tolgee.esm.mjs.map +0 -1
- package/lib/Controller/State/helpers.d.ts +0 -6
- package/lib/Events/EventEmitter.d.ts +0 -6
- package/lib/Events/EventEmitterSelective.d.ts +0 -15
- package/lib/Events/Events.d.ts +0 -50
- package/lib/Tolgee.d.ts +0 -2
- package/lib/constants.d.ts +0 -5
- package/lib/types.d.ts +0 -274
- package/src/Controller/State/helpers.ts +0 -41
- package/src/Events/EventEmitter.ts +0 -27
- package/src/Events/EventEmitterSelective.test.ts +0 -108
- package/src/Events/EventEmitterSelective.ts +0 -160
- package/src/Events/Events.ts +0 -66
- package/src/Tolgee.ts +0 -77
- package/src/constants.ts +0 -7
- package/src/types.ts +0 -380
package/src/types.ts
DELETED
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import type { Options } from './Controller/State/initState';
|
|
2
|
-
|
|
3
|
-
export type { State, Options } from './Controller/State/initState';
|
|
4
|
-
export type { EventEmitterType } from './Events/EventEmitter';
|
|
5
|
-
export type { EventEmitterSelectiveType } from './Events/EventEmitterSelective';
|
|
6
|
-
|
|
7
|
-
export type FallbackGeneral = undefined | false | string | string[];
|
|
8
|
-
|
|
9
|
-
export type FallbackNS = FallbackGeneral;
|
|
10
|
-
|
|
11
|
-
export type NsType = string;
|
|
12
|
-
|
|
13
|
-
export type KeyType = string;
|
|
14
|
-
|
|
15
|
-
export type FallbackNSTranslation = undefined | NsType | NsType[];
|
|
16
|
-
|
|
17
|
-
export type FallbackLanguage = FallbackGeneral;
|
|
18
|
-
|
|
19
|
-
export type FallbackLanguageObject = Record<string, FallbackLanguage>;
|
|
20
|
-
|
|
21
|
-
export type FallbackLanguageOption = FallbackLanguage | FallbackLanguageObject;
|
|
22
|
-
|
|
23
|
-
export type TranslateOptions<T> = {
|
|
24
|
-
ns?: FallbackNSTranslation;
|
|
25
|
-
noWrap?: boolean;
|
|
26
|
-
orEmpty?: boolean;
|
|
27
|
-
params?: TranslateParams<T>;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type TranslateProps<T = DefaultParamType> = {
|
|
31
|
-
key: KeyType;
|
|
32
|
-
defaultValue?: string;
|
|
33
|
-
} & TranslateOptions<T>;
|
|
34
|
-
|
|
35
|
-
export type TranslatePropsInternal = TranslateProps & {
|
|
36
|
-
translation?: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type TranslationValue = string | undefined | null;
|
|
40
|
-
|
|
41
|
-
export type TranslationsFlat = Map<string, TranslationValue>;
|
|
42
|
-
|
|
43
|
-
export type TreeTranslationsData = {
|
|
44
|
-
[key: string]: TranslationValue | TreeTranslationsData;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type CacheAsyncRequests = Map<
|
|
48
|
-
string,
|
|
49
|
-
Promise<TreeTranslationsData | undefined> | undefined
|
|
50
|
-
>;
|
|
51
|
-
|
|
52
|
-
export type CacheDescriptor = {
|
|
53
|
-
language: string;
|
|
54
|
-
namespace?: string;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export type CacheDescriptorInternal = {
|
|
58
|
-
language: string;
|
|
59
|
-
namespace: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type CacheDescriptorWithKey = CacheDescriptorInternal & {
|
|
63
|
-
key?: string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export type KeyAndParams = {
|
|
67
|
-
key: string;
|
|
68
|
-
params?: TranslateParams;
|
|
69
|
-
defaultValue?: string;
|
|
70
|
-
ns?: FallbackNSTranslation;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export type Unwrapped = { text: string; keys: KeyAndParams[] };
|
|
74
|
-
|
|
75
|
-
type PropType<TObj> = TObj[keyof TObj];
|
|
76
|
-
|
|
77
|
-
export type DefaultParamType = string | number | bigint;
|
|
78
|
-
|
|
79
|
-
export type TranslateParams<T = DefaultParamType> = {
|
|
80
|
-
[key: string]: T;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export type CombinedOptions<T> = TranslateOptions<T> & {
|
|
84
|
-
[key: string]: T | PropType<TranslateOptions<T>>;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export type TFnType<T = DefaultParamType, R = string> = {
|
|
88
|
-
(key: string, defaultValue?: string, options?: CombinedOptions<T>): R;
|
|
89
|
-
(key: string, options?: CombinedOptions<T>): R;
|
|
90
|
-
(props: TranslateProps<T>): R;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export type WrapperWrapProps = Pick<
|
|
94
|
-
TranslatePropsInternal,
|
|
95
|
-
'key' | 'params' | 'defaultValue' | 'ns' | 'translation'
|
|
96
|
-
>;
|
|
97
|
-
export type WrapperWrapFunction = (props: WrapperWrapProps) => string;
|
|
98
|
-
export type WrapperUnwrapFunction = (text: string) => Unwrapped;
|
|
99
|
-
|
|
100
|
-
export type WrapperAttributeXPathGetter = (props: {
|
|
101
|
-
tag: string;
|
|
102
|
-
attribute: string;
|
|
103
|
-
}) => string;
|
|
104
|
-
|
|
105
|
-
export type WrapperInterface = {
|
|
106
|
-
unwrap: WrapperUnwrapFunction;
|
|
107
|
-
wrap: WrapperWrapFunction;
|
|
108
|
-
getTextXPath: () => string;
|
|
109
|
-
getAttributeXPath: WrapperAttributeXPathGetter;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export type FormatterInterfaceFormatParams = {
|
|
113
|
-
translation: string;
|
|
114
|
-
language: string;
|
|
115
|
-
params: Record<string, any> | undefined;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export type FormatterInterface = {
|
|
119
|
-
format: (props: FormatterInterfaceFormatParams) => string;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export type FinalFormatterInterface = {
|
|
123
|
-
format: (props: FormatterInterfaceFormatParams) => any;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export type ObserverProps = {
|
|
127
|
-
translate: (params: TranslatePropsInternal) => string;
|
|
128
|
-
onClick: TranslationOnClick;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export type HighlightInterface = (
|
|
132
|
-
key?: string,
|
|
133
|
-
ns?: FallbackNSTranslation
|
|
134
|
-
) => {
|
|
135
|
-
unhighlight(): void;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export type ObserverRunProps = {
|
|
139
|
-
mouseHighlight: boolean;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export type ObserverInterface = (props: ObserverProps) => {
|
|
143
|
-
unwrap: (text: string) => Unwrapped;
|
|
144
|
-
wrap: WrapperWrapFunction;
|
|
145
|
-
retranslate: () => void;
|
|
146
|
-
stop: () => void;
|
|
147
|
-
run: (props: ObserverRunProps) => void;
|
|
148
|
-
highlight: HighlightInterface;
|
|
149
|
-
outputNotFormattable: boolean;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export type LanguageDetectorProps = {
|
|
153
|
-
availableLanguages: string[];
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export type LanguageDetectorInterface = {
|
|
157
|
-
getLanguage: (
|
|
158
|
-
props: LanguageDetectorProps
|
|
159
|
-
) => string | undefined | Promise<string | undefined>;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type LanguageStorageInterface = {
|
|
163
|
-
getLanguage: () => string | undefined | Promise<string | undefined>;
|
|
164
|
-
setLanguage: (language: string) => void | Promise<void>;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export type BackendDevProps = {
|
|
168
|
-
apiUrl?: string;
|
|
169
|
-
apiKey?: string;
|
|
170
|
-
projectId?: number;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
export type BackendGetRecordProps = {
|
|
174
|
-
language: string;
|
|
175
|
-
namespace?: string;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export type BackendGetRecord = (
|
|
179
|
-
data: BackendGetRecordProps
|
|
180
|
-
) => Promise<TreeTranslationsData | undefined> | undefined;
|
|
181
|
-
|
|
182
|
-
export interface BackendInterface {
|
|
183
|
-
getRecord: BackendGetRecord;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export type BackendGetDevRecord = (
|
|
187
|
-
data: BackendGetRecordProps & BackendDevProps
|
|
188
|
-
) => Promise<TreeTranslationsData | undefined> | undefined;
|
|
189
|
-
|
|
190
|
-
export type BackendDevInterface = {
|
|
191
|
-
getRecord: BackendGetDevRecord;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
export type TolgeeEvent =
|
|
195
|
-
| 'pendingLanguage'
|
|
196
|
-
| 'language'
|
|
197
|
-
| 'key'
|
|
198
|
-
| 'loading'
|
|
199
|
-
| 'fetching'
|
|
200
|
-
| 'initialLoad'
|
|
201
|
-
| 'running'
|
|
202
|
-
| 'cache'
|
|
203
|
-
| 'keyUpdate';
|
|
204
|
-
|
|
205
|
-
export type TolgeeOn = {
|
|
206
|
-
(event: 'pendingLanguage', handler: ListenerHandler<string>): Listener;
|
|
207
|
-
(event: 'language', handler: ListenerHandler<string>): Listener;
|
|
208
|
-
(event: 'key', handler: ListenerHandler<string>): Listener;
|
|
209
|
-
(event: 'loading', handler: ListenerHandler<boolean>): Listener;
|
|
210
|
-
(event: 'fetching', handler: ListenerHandler<boolean>): Listener;
|
|
211
|
-
(event: 'initialLoad', handler: ListenerHandler<void>): Listener;
|
|
212
|
-
(event: 'running', handler: ListenerHandler<boolean>): Listener;
|
|
213
|
-
(event: 'keyUpdate', handler: ListenerHandler<void>): Listener;
|
|
214
|
-
(event: TolgeeEvent, handler: ListenerHandler<any>): Listener;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
export type TolgeeInstance = Readonly<{
|
|
218
|
-
on: TolgeeOn;
|
|
219
|
-
onKeyUpdate: (handler: ListenerHandler<void>) => ListenerSelective;
|
|
220
|
-
|
|
221
|
-
use: (plugin: TolgeePlugin | undefined) => TolgeeInstance;
|
|
222
|
-
|
|
223
|
-
getLanguage: () => string | undefined;
|
|
224
|
-
getPendingLanguage: () => string | undefined;
|
|
225
|
-
changeLanguage: (language: string) => Promise<void>;
|
|
226
|
-
changeTranslation: ChangeTranslationInterface;
|
|
227
|
-
addActiveNs: (ns: FallbackNSTranslation, forget?: boolean) => Promise<void>;
|
|
228
|
-
removeActiveNs: (ns: FallbackNSTranslation) => void;
|
|
229
|
-
loadRecords: (descriptors: CacheDescriptor[]) => Promise<TranslationsFlat[]>;
|
|
230
|
-
loadRecord: (descriptors: CacheDescriptor) => Promise<TranslationsFlat>;
|
|
231
|
-
addStaticData: (data: Options['staticData']) => void;
|
|
232
|
-
getRecord: (
|
|
233
|
-
descriptor: CacheDescriptorInternal
|
|
234
|
-
) => TranslationsFlat | undefined;
|
|
235
|
-
getAllRecords: () => CachePublicRecord[];
|
|
236
|
-
isInitialLoading: () => boolean;
|
|
237
|
-
isLoading: (ns?: FallbackNSTranslation) => boolean;
|
|
238
|
-
isLoaded: (ns?: FallbackNSTranslation) => boolean;
|
|
239
|
-
isFetching: (ns?: FallbackNSTranslation) => boolean;
|
|
240
|
-
isRunning: () => boolean;
|
|
241
|
-
highlight: HighlightInterface;
|
|
242
|
-
getInitialOptions: () => Options;
|
|
243
|
-
isDev: () => boolean;
|
|
244
|
-
init: (options: Partial<Options>) => TolgeeInstance;
|
|
245
|
-
run: () => Promise<void>;
|
|
246
|
-
stop: () => void;
|
|
247
|
-
t: (props: TranslatePropsInternal) => string;
|
|
248
|
-
wrap: (params: TranslatePropsInternal) => string | undefined;
|
|
249
|
-
unwrap: (text: string) => Unwrapped;
|
|
250
|
-
}>;
|
|
251
|
-
|
|
252
|
-
export type PluginServicePublic = Readonly<{
|
|
253
|
-
setFinalFormatter: (formatter: FinalFormatterInterface | undefined) => void;
|
|
254
|
-
addFormatter: (formatter: FormatterInterface | undefined) => void;
|
|
255
|
-
setObserver: (observer: ObserverInterface | undefined) => void;
|
|
256
|
-
getObserver: () => ReturnType<ObserverInterface> | undefined;
|
|
257
|
-
setUi: (ui: UiLibInterface | undefined) => void;
|
|
258
|
-
getUi: () => UiConstructor | undefined;
|
|
259
|
-
addBackend: (backend: BackendInterface | undefined) => void;
|
|
260
|
-
setDevBackend: (backend: BackendInterface | undefined) => void;
|
|
261
|
-
setLanguageDetector: (
|
|
262
|
-
languageDetector: LanguageDetectorInterface | undefined
|
|
263
|
-
) => void;
|
|
264
|
-
setLanguageStorage: (
|
|
265
|
-
languageStorage: LanguageStorageInterface | undefined
|
|
266
|
-
) => void;
|
|
267
|
-
}>;
|
|
268
|
-
|
|
269
|
-
export type NodeMeta = {
|
|
270
|
-
oldTextContent: string;
|
|
271
|
-
keys: KeyAndParams[];
|
|
272
|
-
keyAttributeOnly?: boolean;
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
export type ElementMeta = {
|
|
276
|
-
wrappedWithElementOnlyKey?: string;
|
|
277
|
-
wrappedWithElementOnlyDefaultHtml?: string;
|
|
278
|
-
nodes: Map<Node, NodeMeta>;
|
|
279
|
-
highlightEl?: HTMLDivElement;
|
|
280
|
-
highlight?: () => void;
|
|
281
|
-
unhighlight?: () => void;
|
|
282
|
-
/**
|
|
283
|
-
* Stops removing of element's inactive nodes and
|
|
284
|
-
* unregistering from ElementRegistrar.
|
|
285
|
-
*
|
|
286
|
-
* It's used when user has mouse on the element, so there is
|
|
287
|
-
* potential, that element highlight will be triggered.
|
|
288
|
-
*
|
|
289
|
-
* Triggering highlight needs the metadata stored on element, so
|
|
290
|
-
* we need the ability to prevent clean.
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
|
-
preventClean?: boolean;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export type ChangeTranslationInterface = (
|
|
297
|
-
descriptor: CacheDescriptor,
|
|
298
|
-
key: string,
|
|
299
|
-
value: string
|
|
300
|
-
) => { revert: () => void };
|
|
301
|
-
|
|
302
|
-
export type UiProps = {
|
|
303
|
-
apiUrl: string;
|
|
304
|
-
apiKey: string;
|
|
305
|
-
highlight: HighlightInterface;
|
|
306
|
-
changeTranslation: ChangeTranslationInterface;
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
export interface UiInterface {
|
|
310
|
-
handleElementClick(
|
|
311
|
-
event: MouseEvent,
|
|
312
|
-
keysAndDefaults: UiKeyOption[]
|
|
313
|
-
): Promise<void>;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export type UiConstructor = new (props: UiProps) => UiInterface;
|
|
317
|
-
|
|
318
|
-
export type UiLibInterface = {
|
|
319
|
-
UI: UiConstructor;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
export type UiType = UiConstructor | UiLibInterface;
|
|
323
|
-
|
|
324
|
-
export type UiKeyOption = {
|
|
325
|
-
key: string;
|
|
326
|
-
defaultValue?: string;
|
|
327
|
-
ns: string[];
|
|
328
|
-
translation: string | undefined;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
export type KeyWithDefault = {
|
|
332
|
-
key: string;
|
|
333
|
-
defaultValue?: string;
|
|
334
|
-
ns: FallbackNSTranslation;
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
export type TranslationOnClick = (
|
|
338
|
-
event: MouseEvent,
|
|
339
|
-
data: {
|
|
340
|
-
keysAndDefaults: KeyWithDefault[];
|
|
341
|
-
el: Element;
|
|
342
|
-
meta: ElementMeta;
|
|
343
|
-
}
|
|
344
|
-
) => void;
|
|
345
|
-
|
|
346
|
-
export type Listener = {
|
|
347
|
-
unsubscribe: () => void;
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
export type KeyDescriptorInternal = {
|
|
351
|
-
key?: string;
|
|
352
|
-
ns?: string[] | undefined;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export type KeyDescriptor = {
|
|
356
|
-
key: string;
|
|
357
|
-
ns?: string | string[];
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
export type ListenerSelective = {
|
|
361
|
-
unsubscribe: () => void;
|
|
362
|
-
subscribeNs: (ns: FallbackNSTranslation) => ListenerSelective;
|
|
363
|
-
unsubscribeNs: (ns: FallbackNSTranslation) => ListenerSelective;
|
|
364
|
-
subscribeKey: (descriptor: KeyDescriptor) => ListenerSelective;
|
|
365
|
-
unsubscribeKey: (descriptor: KeyDescriptor) => ListenerSelective;
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
export type ListenerHandlerEvent<T> = { value: T };
|
|
369
|
-
export type ListenerHandler<T> = (e: ListenerHandlerEvent<T>) => void;
|
|
370
|
-
|
|
371
|
-
export type TolgeePlugin = (
|
|
372
|
-
tolgee: TolgeeInstance,
|
|
373
|
-
tools: PluginServicePublic
|
|
374
|
-
) => TolgeeInstance;
|
|
375
|
-
|
|
376
|
-
export type CachePublicRecord = {
|
|
377
|
-
data: TranslationsFlat;
|
|
378
|
-
language: string;
|
|
379
|
-
namespace: string;
|
|
380
|
-
};
|