@verbaly/compiler 0.69.0 → 0.69.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.
- package/README.md +3 -2
- package/dist/cli.js +16 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1450,11 +1450,22 @@ ${lines.join("\n")}
|
|
|
1450
1450
|
): import('verbaly').Verbaly;
|
|
1451
1451
|
export function createRequestInstance(locale: string): Promise<import('verbaly').Verbaly>;
|
|
1452
1452
|
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
?
|
|
1457
|
-
:
|
|
1453
|
+
// a key written as a literal must exist; string, or a template with a part from data, is data
|
|
1454
|
+
export function t<K extends VerbalyKey | TemplateStringsArray | (string & {})>(
|
|
1455
|
+
first: K extends TemplateStringsArray
|
|
1456
|
+
? K
|
|
1457
|
+
: {} extends Record<K & string, 1>
|
|
1458
|
+
? K
|
|
1459
|
+
: K extends VerbalyKey ? K : VerbalyKey,
|
|
1460
|
+
...rest: [K] extends [never]
|
|
1461
|
+
? [params?: import('verbaly').Params]
|
|
1462
|
+
: K extends TemplateStringsArray
|
|
1463
|
+
? unknown[]
|
|
1464
|
+
: {} extends Record<K & string, 1>
|
|
1465
|
+
? [params?: import('verbaly').Params]
|
|
1466
|
+
: K extends VerbalyKey
|
|
1467
|
+
? [VerbalyMessages[K]] extends [never] ? [] : [VerbalyMessages[K]]
|
|
1468
|
+
: unknown[]
|
|
1458
1469
|
): string;
|
|
1459
1470
|
export namespace t {
|
|
1460
1471
|
export function id(
|