@tstdl/base 0.83.12 → 0.83.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.13",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@types/mjml": "4.7",
|
|
32
32
|
"@types/node": "18",
|
|
33
33
|
"@types/nodemailer": "6.4",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
35
|
-
"@typescript-eslint/parser": "5.
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "5.57",
|
|
35
|
+
"@typescript-eslint/parser": "5.57",
|
|
36
36
|
"concurrently": "7.6",
|
|
37
37
|
"esbuild": "0.17",
|
|
38
38
|
"eslint": "8.36",
|
|
@@ -15,7 +15,7 @@ export type EnumerationLocalization<T extends Enumeration = Enumeration> = {
|
|
|
15
15
|
[P in EnumerationValue<T>]: LocalizeItem<any>;
|
|
16
16
|
};
|
|
17
17
|
export type EnumerationLocalizationEntry<T extends Enumeration = Enumeration> = [T, EnumerationLocalization<T>];
|
|
18
|
-
export type Localization<T extends LocalizationTemplate = LocalizationTemplate, Enums extends Enumeration[] = []> = {
|
|
18
|
+
export type Localization<T extends LocalizationTemplate = LocalizationTemplate, Enums extends Enumeration[] = Enumeration[]> = {
|
|
19
19
|
language: Language;
|
|
20
20
|
keys: T;
|
|
21
21
|
enums: {
|
|
@@ -60,11 +60,11 @@ export declare class LocalizationService {
|
|
|
60
60
|
readonly activeLanguage$: Observable<Language | undefined>;
|
|
61
61
|
readonly availableLanguages$: Observable<readonly Language[]>;
|
|
62
62
|
constructor(logger: Logger);
|
|
63
|
-
registerLocalization(...localizations: Localization
|
|
63
|
+
registerLocalization(...localizations: Localization[]): void;
|
|
64
64
|
hasLanguage(languageCode: string): boolean;
|
|
65
65
|
getLanguage(languageCode: string): Language;
|
|
66
66
|
setLanguage(languageOrCode: Language | string): void;
|
|
67
|
-
setLocalization(localization: Localization
|
|
67
|
+
setLocalization(localization: Localization): void;
|
|
68
68
|
tryGetItem<Parameters>(key: LocalizationKey<Parameters> | LocalizationData<Parameters>): LocalizeItem | undefined;
|
|
69
69
|
hasKey<Parameters>(key: LocalizationKey<Parameters> | LocalizationData<Parameters>): boolean;
|
|
70
70
|
localize<Parameters>(keyOrData: LocalizationKey<Parameters> | LocalizationData<Parameters>): string;
|