@vrtmrz/livesync-commonlib 0.1.0-rc.1 → 0.1.0-rc.10
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 +90 -20
- package/dist/API/DirectFileManipulatorV2.d.ts +3 -0
- package/dist/common/configForDoc.d.ts +1 -0
- package/dist/common/configForDoc.js +24 -7
- package/dist/common/models/setting.const.defaults.d.ts +19 -0
- package/dist/common/models/setting.const.defaults.js +21 -2
- package/dist/common/models/setting.const.preferred.js +1 -2
- package/dist/common/models/setting.lifecycle.d.ts +33 -0
- package/dist/common/models/setting.lifecycle.js +121 -0
- package/dist/common/models/setting.type.d.ts +10 -4
- package/dist/common/models/shared.definition.configNames.js +3 -3
- package/dist/common/models/tweak.definition.d.ts +1 -1
- package/dist/common/models/tweak.definition.js +1 -6
- package/dist/common/settingConstants.d.ts +3 -2
- package/dist/common/settingConstants.js +6 -6
- package/dist/common/types.d.ts +4 -2
- package/dist/common/types.js +16 -1
- package/dist/context.d.ts +2 -1
- package/dist/context.js +4 -0
- package/dist/interfaces/Confirm.d.ts +10 -2
- package/dist/interfaces/DatabaseFileAccess.d.ts +8 -0
- package/dist/interfaces/DatabaseRebuilder.d.ts +12 -2
- package/dist/interfaces/FileReflectionProvenance.d.ts +32 -0
- package/dist/interfaces/FileReflectionProvenance.js +25 -0
- package/dist/managers/ConflictManager.js +16 -7
- package/dist/managers/EntryManager/EntryManager.d.ts +1 -0
- package/dist/managers/EntryManager/EntryManager.js +5 -1
- package/dist/managers/EntryManager/EntryManagerImpls.d.ts +1 -0
- package/dist/managers/EntryManager/EntryManagerImpls.js +29 -1
- package/dist/platform/node/storage.d.ts +10 -1
- package/dist/platform/node/storage.js +86 -25
- package/dist/pouchdb/LiveSyncLocalDB.d.ts +1 -0
- package/dist/pouchdb/LiveSyncLocalDB.js +3 -0
- package/dist/remoteConfigurations.d.ts +9 -0
- package/dist/remoteConfigurations.js +14 -0
- package/dist/replication/LiveSyncAbstractReplicator.d.ts +3 -3
- package/dist/replication/couchdb/LiveSyncReplicator.d.ts +0 -1
- package/dist/replication/couchdb/LiveSyncReplicator.js +0 -3
- package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +0 -1
- package/dist/replication/journal/LiveSyncJournalReplicator.js +0 -3
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.d.ts +5 -3
- package/dist/replication/trystero/LiveSyncTrysteroReplicator.js +42 -30
- package/dist/replication/trystero/P2PReplicatorCore.d.ts +2 -6
- package/dist/replication/trystero/P2PReplicatorCore.js +16 -86
- package/dist/replication/trystero/TrysteroReplicator.d.ts +2 -1
- package/dist/replication/trystero/TrysteroReplicator.js +10 -4
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.d.ts +4 -5
- package/dist/replication/trystero/TrysteroReplicatorP2PServer.js +22 -30
- package/dist/replication/trystero/UseP2PReplicatorResult.d.ts +10 -2
- package/dist/replication/trystero/addP2PEventHandlers.d.ts +4 -2
- package/dist/replication/trystero/addP2PEventHandlers.js +9 -10
- package/dist/replication/trystero/types.d.ts +2 -0
- package/dist/replication/trystero/useP2PReplicatorCommands.d.ts +1 -1
- package/dist/replication/trystero/useP2PReplicatorCommands.js +3 -1
- package/dist/replication/trystero/useP2PReplicatorFeature.js +25 -15
- package/dist/rpc/RpcRoom.d.ts +1 -1
- package/dist/rpc/RpcRoom.js +22 -16
- package/dist/rpc/transports/TrysteroTransport.d.ts +2 -0
- package/dist/rpc/transports/TrysteroTransport.js +24 -17
- package/dist/rpc/transports/trysteroRoomEvents.d.ts +14 -0
- package/dist/rpc/transports/trysteroRoomEvents.js +34 -0
- package/dist/serviceFeatures/checkRemoteSize.d.ts +5 -3
- package/dist/serviceFeatures/checkRemoteSize.js +51 -11
- package/dist/serviceFeatures/remoteConfig.d.ts +37 -1
- package/dist/serviceFeatures/remoteConfig.js +90 -0
- package/dist/serviceModules/Rebuilder.d.ts +3 -6
- package/dist/serviceModules/Rebuilder.js +31 -22
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.d.ts +5 -0
- package/dist/serviceModules/ServiceDatabaseFileAccessBase.js +69 -13
- package/dist/serviceModules/ServiceFileHandlerBase.d.ts +20 -0
- package/dist/serviceModules/ServiceFileHandlerBase.js +224 -40
- package/dist/services/BrowserServices.d.ts +2 -0
- package/dist/services/BrowserServices.js +4 -1
- package/dist/services/HeadlessServices.d.ts +2 -0
- package/dist/services/HeadlessServices.js +2 -1
- package/dist/services/base/CommonlibMessages.d.ts +318 -0
- package/dist/services/base/CommonlibMessages.js +313 -0
- package/dist/services/base/IService.d.ts +13 -6
- package/dist/services/base/KeyValueDBService.d.ts +1 -1
- package/dist/services/base/KeyValueDBService.js +3 -1
- package/dist/services/base/MessageTranslator.d.ts +5 -2
- package/dist/services/base/MessageTranslator.js +21 -0
- package/dist/services/base/ReplicationService.d.ts +4 -2
- package/dist/services/base/ReplicationService.js +11 -16
- package/dist/services/base/ServiceBase.d.ts +1 -1
- package/dist/services/base/ServiceBase.js +2 -4
- package/dist/services/base/SettingService.d.ts +17 -9
- package/dist/services/base/SettingService.js +38 -19
- package/dist/services/implements/headless/HeadlessAPIService.d.ts +3 -3
- package/dist/services/implements/headless/HeadlessAPIService.js +2 -2
- package/dist/services/implements/injectable/InjectableTweakValueService.d.ts +3 -3
- package/dist/settings.d.ts +10 -0
- package/dist/settings.js +32 -0
- package/dist/worker/bgWorker.js +1 -1
- package/docs/conflict-resolution.md +153 -0
- package/docs/development.md +106 -7
- package/docs/p2p-transport-lifecycle.md +62 -0
- package/docs/platform-storage.md +4 -0
- package/docs/proven-in-use.md +65 -0
- package/docs/releasing.md +26 -6
- package/docs/remote-configurations.md +63 -0
- package/docs/settings-lifecycle.md +85 -0
- package/package.json +17 -27
- package/dist/common/i18n.d.ts +0 -18
- package/dist/common/i18n.js +0 -7193
- package/dist/common/messages/combinedMessages.dev.d.ts +0 -7
- package/dist/common/messages/combinedMessages.dev.js +0 -44
- package/dist/common/messages/combinedMessages.prod.d.ts +0 -9264
- package/dist/common/messages/combinedMessages.prod.js +0 -9271
- package/dist/common/messages/de.d.ts +0 -297
- package/dist/common/messages/de.js +0 -7
- package/dist/common/messages/def.d.ts +0 -1119
- package/dist/common/messages/def.js +0 -7
- package/dist/common/messages/es.d.ts +0 -689
- package/dist/common/messages/es.js +0 -7
- package/dist/common/messages/fr.d.ts +0 -582
- package/dist/common/messages/fr.js +0 -7
- package/dist/common/messages/he.d.ts +0 -583
- package/dist/common/messages/he.js +0 -7
- package/dist/common/messages/ja.d.ts +0 -838
- package/dist/common/messages/ja.js +0 -7
- package/dist/common/messages/ko.d.ts +0 -800
- package/dist/common/messages/ko.js +0 -7
- package/dist/common/messages/ru.d.ts +0 -858
- package/dist/common/messages/ru.js +0 -7
- package/dist/common/messages/zh-tw.d.ts +0 -384
- package/dist/common/messages/zh-tw.js +0 -7
- package/dist/common/messages/zh.d.ts +0 -1093
- package/dist/common/messages/zh.js +0 -7
- package/dist/common/messagesJson/de.json +0 -295
- package/dist/common/messagesJson/en.json +0 -1117
- package/dist/common/messagesJson/es.json +0 -687
- package/dist/common/messagesJson/fr.json +0 -580
- package/dist/common/messagesJson/he.json +0 -581
- package/dist/common/messagesJson/ja.json +0 -836
- package/dist/common/messagesJson/ko.json +0 -798
- package/dist/common/messagesJson/ru.json +0 -856
- package/dist/common/messagesJson/zh-tw.json +0 -382
- package/dist/common/messagesJson/zh.json +0 -1091
- package/dist/common/rosetta.d.ts +0 -42
- package/dist/common/rosetta.js +0 -57
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Settings lifecycle
|
|
2
|
+
|
|
3
|
+
Commonlib separates three values which older integrations commonly treated as one object:
|
|
4
|
+
|
|
5
|
+
- `SETTINGS_SCHEMA_DEFAULTS` completes keys which are absent from stored settings. Its values remain conservative so that an upgrade does not silently change an existing choice.
|
|
6
|
+
- `NEW_VAULT_SETTINGS` initialises a store which has never contained Self-hosted LiveSync settings. It includes the current recommended base values.
|
|
7
|
+
- the `PREFERRED_SETTING_*` objects add remote-specific recommendations when a user explicitly selects Cloudant, self-hosted CouchDB, or Object Storage during setup.
|
|
8
|
+
|
|
9
|
+
`DEFAULT_SETTINGS` remains an alias of `SETTINGS_SCHEMA_DEFAULTS` for compatibility. New code should choose the named contract which matches its operation.
|
|
10
|
+
|
|
11
|
+
## Starting a new Vault
|
|
12
|
+
|
|
13
|
+
Use `createNewVaultSettings()` only when the settings store is absent or empty, or when the user explicitly requests a factory reset. `NEW_VAULT_SETTINGS` exposes the values for inspection, while the factory prevents mutable nested settings from being shared between clients:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createNewVaultSettings } from "@vrtmrz/livesync-commonlib/settings";
|
|
17
|
+
|
|
18
|
+
const initialSettings = createNewVaultSettings();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The recommended base currently selects a 50 MB maximum synchronised file size, Rabin–Karp chunk splitting, Plug-in Sync V2, case-insensitive file-name handling, and E2EE V2. Chunk revisions are always derived from their content; the obsolete `doNotUseFixedRevisionForChunks` stored key is retained only for compatibility and is not a recommendation or tweak. The recommended base does not enable synchronisation or encryption on behalf of the user.
|
|
22
|
+
|
|
23
|
+
Compared with the conservative stored-setting fallbacks, the current new-Vault object has exactly two semantic differences:
|
|
24
|
+
|
|
25
|
+
| Setting | Existing stored setting is absent | New Vault |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `usePluginSyncV2` | `false` | `true` |
|
|
28
|
+
| `handleFilenameCaseSensitive` | normalised from the legacy absent value to `false` | `false` |
|
|
29
|
+
|
|
30
|
+
The other headline recommendations are already the conservative fallbacks: `syncMaxSizeInMB` is 50, `chunkSplitterVersion` is `v3-rabin-karp`, and `E2EEAlgorithm` is `v2`. Data Compression, Eden, V1 dynamic iteration, the legacy IndexedDB adapter, Hidden File Sync, and automatic synchronisation remain disabled when their stored values are absent. Explicit stored values take precedence.
|
|
31
|
+
|
|
32
|
+
Apply a remote-specific preferred object only while configuring that remote. Do not merge it into an existing stored configuration merely because the remote type can be inferred. The self-hosted CouchDB profile uses a chunk-size coefficient of 60, matching the Doctor check for Rabin–Karp databases; Cloudant retains its service-specific value of 0.
|
|
33
|
+
|
|
34
|
+
| Explicitly selected remote | `customChunkSize` | `concurrencyOfReadChunksOnline` | `minimumIntervalOfReadChunksOnline` |
|
|
35
|
+
| --- | ---: | ---: | ---: |
|
|
36
|
+
| Cloudant | 0 | 100 | 333 |
|
|
37
|
+
| Self-hosted CouchDB | 60 | 30 | 25 |
|
|
38
|
+
| Object Storage | 10 | 30 | 25 |
|
|
39
|
+
|
|
40
|
+
These are setup-time recommendations, not upgrade migrations. Selecting or detecting a remote does not apply them to an existing configuration unless the person is actively configuring that remote.
|
|
41
|
+
|
|
42
|
+
## Loading existing settings
|
|
43
|
+
|
|
44
|
+
`prepareSettingsForLoad` detects a blank store, completes stored settings with conservative schema fallbacks, runs ordered schema migrations, and reports the result separately from the settings value:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import { prepareSettingsForLoad } from "@vrtmrz/livesync-commonlib/settings";
|
|
48
|
+
|
|
49
|
+
const prepared = prepareSettingsForLoad(await host.loadSettings());
|
|
50
|
+
const settings = prepared.settings;
|
|
51
|
+
|
|
52
|
+
if (prepared.changed && !prepared.isFromFutureSchema) {
|
|
53
|
+
await host.saveSettings(settings);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (prepared.requiresSyncReview) {
|
|
57
|
+
host.requestLocalSyncReview(prepared.reviewReasons);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Explicit stored values take precedence over every fallback. A migration therefore preserves synchronisation switches and other user choices unless a migration step documents a deliberate transformation.
|
|
62
|
+
|
|
63
|
+
An existing settings store without an explicit `handleFilenameCaseSensitive` value is normalised to `false` and saved. This preserves the effective behaviour of earlier releases, where an absent value followed the case-insensitive branch. An explicit `true` or `false` value is preserved. New Vaults also select case-insensitive handling (`false`).
|
|
64
|
+
|
|
65
|
+
`isConfigured` has a separate compatibility rule from new-Vault initialisation. For a blank store, the standard service keeps the runtime unconfigured. For a non-empty legacy document without the flag, Commonlib repeats the pre-1.0 inference: a document which is equivalent to the conservative defaults remains `false`, while a stored non-default value is evidence for `true`. The inferred boolean is saved. An explicit boolean is preserved. This rule does not make a non-empty document eligible for new-Vault recommendations.
|
|
66
|
+
|
|
67
|
+
Two other values deliberately remain unset until their owning lifecycle supplies evidence: `autoAcceptCompatibleTweak` represents that no auto-accept decision has been made, and `tweakModified` represents that no tweak-change timestamp has been recorded. They are not implicit boolean defaults and are not normalised by the settings migration.
|
|
68
|
+
|
|
69
|
+
`SettingsMigrationReviewCodes.FilenameCaseSensitivityUnresolved` remains as a deprecated compatibility export for release-candidate consumers, but `prepareSettingsForLoad` no longer emits it.
|
|
70
|
+
|
|
71
|
+
The standard Commonlib `SettingService` performs this preparation automatically. Hosts which use that service can inspect `getSettingsMigrationState()` after `loadSettings()` instead of calling the function themselves.
|
|
72
|
+
|
|
73
|
+
## Review and downgrade boundary
|
|
74
|
+
|
|
75
|
+
A migration may report `requiresSyncReview` when automatic synchronisation should wait for a human decision. Commonlib reports that requirement but does not disable synchronisation settings, persist an acknowledgement, display a dialogue, or decide whether replication may proceed. Those are host-local responsibilities because one device must not acknowledge a safety review for another device through synchronised settings.
|
|
76
|
+
|
|
77
|
+
Settings written by a schema newer than the running Commonlib version are completed for in-memory compatibility but are not assigned an older schema version. The result has `isFromFutureSchema: true`, `changed: false`, and a review reason. A host must not persist that completed object as a downgrade migration.
|
|
78
|
+
|
|
79
|
+
The settings schema version is independent of the package version and of any remote data or protocol compatibility version. Increment it only when the stored settings shape requires an ordered migration.
|
|
80
|
+
|
|
81
|
+
## Tests owned by Commonlib
|
|
82
|
+
|
|
83
|
+
The settings lifecycle unit tests cover blank stores, representative legacy choices, migration idempotence, legacy file-name case normalisation, legacy review state, future-schema downgrade protection, and the distinction between new-Vault recommendations and stored-setting fallbacks. The packed-package test imports the focused `/settings` entry from a clean consumer and checks its declarations and runtime exports.
|
|
84
|
+
|
|
85
|
+
Hosts remain responsible for testing when setup is classified as new, how local review acknowledgement is stored, how replication is gated, and how their settings interface presents the result.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vrtmrz/livesync-commonlib",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.10",
|
|
4
4
|
"description": "Shared data, storage, and replication primitives for Self-hosted LiveSync clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,16 @@
|
|
|
56
56
|
"import": "./dist/rpc/index.js",
|
|
57
57
|
"default": "./dist/rpc/index.js"
|
|
58
58
|
},
|
|
59
|
+
"./remote-configurations": {
|
|
60
|
+
"types": "./dist/remoteConfigurations.d.ts",
|
|
61
|
+
"import": "./dist/remoteConfigurations.js",
|
|
62
|
+
"default": "./dist/remoteConfigurations.js"
|
|
63
|
+
},
|
|
64
|
+
"./settings": {
|
|
65
|
+
"types": "./dist/settings.d.ts",
|
|
66
|
+
"import": "./dist/settings.js",
|
|
67
|
+
"default": "./dist/settings.js"
|
|
68
|
+
},
|
|
59
69
|
"./compat/API/processSetting": {
|
|
60
70
|
"types": "./dist/API/processSetting.d.ts",
|
|
61
71
|
"import": "./dist/API/processSetting.js",
|
|
@@ -91,11 +101,6 @@
|
|
|
91
101
|
"import": "./dist/common/coreEnvVars.js",
|
|
92
102
|
"default": "./dist/common/coreEnvVars.js"
|
|
93
103
|
},
|
|
94
|
-
"./compat/common/i18n": {
|
|
95
|
-
"types": "./dist/common/i18n.d.ts",
|
|
96
|
-
"import": "./dist/common/i18n.js",
|
|
97
|
-
"default": "./dist/common/i18n.js"
|
|
98
|
-
},
|
|
99
104
|
"./compat/common/logger": {
|
|
100
105
|
"types": "./dist/common/logger.d.ts",
|
|
101
106
|
"import": "./dist/common/logger.js",
|
|
@@ -116,16 +121,6 @@
|
|
|
116
121
|
"import": "./dist/common/models/setting.const.js",
|
|
117
122
|
"default": "./dist/common/models/setting.const.js"
|
|
118
123
|
},
|
|
119
|
-
"./compat/common/models/setting.const.defaults": {
|
|
120
|
-
"types": "./dist/common/models/setting.const.defaults.d.ts",
|
|
121
|
-
"import": "./dist/common/models/setting.const.defaults.js",
|
|
122
|
-
"default": "./dist/common/models/setting.const.defaults.js"
|
|
123
|
-
},
|
|
124
|
-
"./compat/common/models/setting.const.preferred": {
|
|
125
|
-
"types": "./dist/common/models/setting.const.preferred.d.ts",
|
|
126
|
-
"import": "./dist/common/models/setting.const.preferred.js",
|
|
127
|
-
"default": "./dist/common/models/setting.const.preferred.js"
|
|
128
|
-
},
|
|
129
124
|
"./compat/common/models/setting.type": {
|
|
130
125
|
"types": "./dist/common/models/setting.type.d.ts",
|
|
131
126
|
"import": "./dist/common/models/setting.type.js",
|
|
@@ -146,11 +141,6 @@
|
|
|
146
141
|
"import": "./dist/common/models/tweak.definition.js",
|
|
147
142
|
"default": "./dist/common/models/tweak.definition.js"
|
|
148
143
|
},
|
|
149
|
-
"./compat/common/rosetta": {
|
|
150
|
-
"types": "./dist/common/rosetta.d.ts",
|
|
151
|
-
"import": "./dist/common/rosetta.js",
|
|
152
|
-
"default": "./dist/common/rosetta.js"
|
|
153
|
-
},
|
|
154
144
|
"./compat/common/settingConstants": {
|
|
155
145
|
"types": "./dist/common/settingConstants.d.ts",
|
|
156
146
|
"import": "./dist/common/settingConstants.js",
|
|
@@ -196,11 +186,6 @@
|
|
|
196
186
|
"import": "./dist/events/coreEvents.js",
|
|
197
187
|
"default": "./dist/events/coreEvents.js"
|
|
198
188
|
},
|
|
199
|
-
"./compat/hub/hub": {
|
|
200
|
-
"types": "./dist/hub/hub.d.ts",
|
|
201
|
-
"import": "./dist/hub/hub.js",
|
|
202
|
-
"default": "./dist/hub/hub.js"
|
|
203
|
-
},
|
|
204
189
|
"./compat/interfaces/Confirm": {
|
|
205
190
|
"types": "./dist/interfaces/Confirm.d.ts",
|
|
206
191
|
"import": "./dist/interfaces/Confirm.js",
|
|
@@ -216,6 +201,11 @@
|
|
|
216
201
|
"import": "./dist/interfaces/DatabaseRebuilder.js",
|
|
217
202
|
"default": "./dist/interfaces/DatabaseRebuilder.js"
|
|
218
203
|
},
|
|
204
|
+
"./compat/interfaces/FileReflectionProvenance": {
|
|
205
|
+
"types": "./dist/interfaces/FileReflectionProvenance.d.ts",
|
|
206
|
+
"import": "./dist/interfaces/FileReflectionProvenance.js",
|
|
207
|
+
"default": "./dist/interfaces/FileReflectionProvenance.js"
|
|
208
|
+
},
|
|
219
209
|
"./compat/interfaces/FileHandler": {
|
|
220
210
|
"types": "./dist/interfaces/FileHandler.d.ts",
|
|
221
211
|
"import": "./dist/interfaces/FileHandler.js",
|
|
@@ -656,7 +646,7 @@
|
|
|
656
646
|
"@smithy/middleware-apply-body-checksum": "^4.3.9",
|
|
657
647
|
"@smithy/types": "^4.14.3",
|
|
658
648
|
"@smithy/util-retry": "^4.4.5",
|
|
659
|
-
"@trystero-p2p/nostr": "
|
|
649
|
+
"@trystero-p2p/nostr": "0.25.3",
|
|
660
650
|
"diff-match-patch": "^1.0.5",
|
|
661
651
|
"events": "^3.3.0",
|
|
662
652
|
"fflate": "^0.8.2",
|
package/dist/common/i18n.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AllMessageKeys, I18N_LANGS } from "./rosetta.js";
|
|
2
|
-
import type { TaggedType } from "./types.js";
|
|
3
|
-
export declare let currentLang: I18N_LANGS;
|
|
4
|
-
export declare function getResolvedLang(lang?: I18N_LANGS): I18N_LANGS;
|
|
5
|
-
export declare function isAutoDisplayLanguage(lang: I18N_LANGS): boolean;
|
|
6
|
-
export declare function __getMissingTranslations(): string[];
|
|
7
|
-
export declare function __onMissingTranslation(callback: (key: string) => void): void;
|
|
8
|
-
export declare function setLang(lang: I18N_LANGS): void;
|
|
9
|
-
export declare function $t(message: string, lang?: I18N_LANGS): string;
|
|
10
|
-
export declare function translateIfAvailable(message: string, lang?: I18N_LANGS): string;
|
|
11
|
-
/**
|
|
12
|
-
* TagFunction to Automatically translate.
|
|
13
|
-
* @param strings
|
|
14
|
-
* @param values
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function $f(strings: TemplateStringsArray, ...values: string[]): string;
|
|
18
|
-
export declare function $msg<T extends AllMessageKeys>(key: T, params?: Record<string, string>, lang?: I18N_LANGS): TaggedType<string, T>;
|