@kizunajs/i18n 0.1.0 → 0.2.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 CHANGED
@@ -1,5 +1,6 @@
1
1
  # Kizuna i18n
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@kizunajs/i18n?color=blue&label=npm)](https://www.npmjs.com/package/@kizunajs/i18n)
3
4
  ![license](https://img.shields.io/badge/license-MIT-blue)
4
5
 
5
6
  Write your translations in TypeScript. Get typed text in your app, and a build that fails when a language is missing or a text won't fit.
@@ -7,8 +8,8 @@ Write your translations in TypeScript. Get typed text in your app, and a build t
7
8
  ## Features
8
9
 
9
10
  - **Broken translations don't compile**: forget Norwegian, or write `{fornavn}` where English has `{firstName}`, and `tsc` names the language that's wrong
10
- - **Text that fits**: `.maxLength(16)` on a button label, and a German text that's too long fails the build
11
- - **Docs on hover**: every message shows its text, what it's for and its limit in your editor
11
+ - **Text that fits**: `maxLength: 16` on a button label, and a German text that's too long fails the build
12
+ - **Docs on hover**: every message shows its text in every language, what it's for and its limit in your editor
12
13
  - **Nothing to install**: the generated file has no imports, so your app ships no i18n library
13
14
  - **Links inside sentences**: `<terms>the terms of sale</terms>` renders as your own `<a>`, in every language
14
15
  - **Ship a language half done**: `de` shows the English text for messages nobody has translated yet
@@ -39,25 +40,31 @@ export const i18n = defineI18n({
39
40
  });
40
41
  ```
41
42
 
42
- Write the messages:
43
+ Declare each message, then give it its texts:
43
44
 
44
45
  ```ts
45
46
  // translations/cart.ts
46
47
  import { i18n } from './i18n';
47
48
 
48
49
  export const cart = i18n.messages({
49
- title: i18n.message({
50
+ title: i18n.message().translations({
50
51
  en: 'Your cart',
51
52
  nb: 'Handlekurven din',
52
53
  }),
53
- greeting: i18n.message({
54
- en: 'Welcome back, {firstName}',
55
- nb: 'Velkommen tilbake, {firstName}',
56
- }),
54
+ greeting: i18n
55
+ .message({
56
+ params: {
57
+ firstName: i18n.string(),
58
+ },
59
+ })
60
+ .translations({
61
+ en: 'Welcome back, {firstName}',
62
+ nb: 'Velkommen tilbake, {firstName}',
63
+ }),
57
64
  });
58
65
  ```
59
66
 
60
- Every language must use the base language's `{params}` and `<tags>`:
67
+ Every language must use exactly the declared `{params}`:
61
68
 
62
69
  ```ts
63
70
  nb: 'Velkommen tilbake, {fornavn}',
@@ -118,6 +125,50 @@ import { matchLocale } from './translations.generated';
118
125
  export const getLocale = async () => matchLocale((await headers()).get('accept-language') ?? '');
119
126
  ```
120
127
 
128
+ ## Nested groups
129
+
130
+ A plain object inside a group nests a group, at any depth:
131
+
132
+ ```ts
133
+ export const checkout = i18n.messages({
134
+ form: {
135
+ email: {
136
+ label: i18n.message().translations({
137
+ en: 'Email',
138
+ nb: 'E-post',
139
+ }),
140
+ },
141
+ },
142
+ });
143
+ ```
144
+
145
+ ```ts
146
+ t.checkout.form.email.label; // 'E-post'
147
+ ```
148
+
149
+ ## Params
150
+
151
+ A param is `i18n.string()` or `i18n.number()`, and the generated code takes that type:
152
+
153
+ ```ts
154
+ items: i18n
155
+ .message({
156
+ params: {
157
+ count: i18n.number(),
158
+ },
159
+ })
160
+ .translations({
161
+ en: 'Items in your cart: {count}',
162
+ nb: 'Varer i handlekurven: {count}',
163
+ }),
164
+ ```
165
+
166
+ ```ts
167
+ t.cart.items({
168
+ count: 3,
169
+ }); // 'Varer i handlekurven: 3'
170
+ ```
171
+
121
172
  ## Length limits
122
173
 
123
174
  `maxLength` sets the most characters a text may have, in every language:
@@ -125,27 +176,31 @@ export const getLocale = async () => matchLocale((await headers()).get('accept-l
125
176
  ```ts
126
177
  title: i18n
127
178
  .message({
179
+ maxLength: 16,
180
+ })
181
+ .translations({
128
182
  en: 'Your cart',
129
183
  nb: 'Handlekurven din',
130
- })
131
- .maxLength(16),
184
+ }),
132
185
  ```
133
186
 
134
- The compiler checks texts without params. `kizuna-i18n check` checks the rest, with the params filled in from `example`.
187
+ The compiler checks texts without params. `kizuna-i18n check` checks the rest, with each param's example filled in.
135
188
 
136
189
  ## Descriptions and examples
137
190
 
138
- `describe` and `example` show up in the generated JSDoc:
191
+ `description` and each param's `example` show up in the generated JSDoc:
139
192
 
140
193
  ```ts
141
194
  greeting: i18n
142
195
  .message({
196
+ description: 'Shown above the cart to a customer who is logged in',
197
+ params: {
198
+ firstName: i18n.string().example('Ada'),
199
+ },
200
+ })
201
+ .translations({
143
202
  en: 'Welcome back, {firstName}',
144
203
  nb: 'Velkommen tilbake, {firstName}',
145
- })
146
- .describe('Shown above the cart to a customer who is logged in')
147
- .example({
148
- firstName: 'Ada',
149
204
  }),
150
205
  ```
151
206
 
@@ -168,10 +223,10 @@ export const i18n = defineI18n({
168
223
 
169
224
  ## Tags
170
225
 
171
- Pass a function for each `<tag>`. It gets the translated text inside the tag:
226
+ Every language must use the base language's `<tags>`. Pass a function for each tag. It gets the translated text inside the tag:
172
227
 
173
228
  ```ts
174
- terms: i18n.message({
229
+ terms: i18n.message().translations({
175
230
  en: 'I agree to <terms>the terms of sale</terms>',
176
231
  nb: 'Jeg godtar <terms>salgsvilkårene</terms>',
177
232
  }),
@@ -229,8 +284,6 @@ export const csharpTarget = defineTarget({
229
284
  });
230
285
  ```
231
286
 
232
- Run [`conformance/fixtures`](conformance/fixtures) against your target to check it renders like the generated TypeScript.
233
-
234
287
  ## License
235
288
 
236
289
  MIT
package/dist/bin.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_load = require("./load-dVzjsBK6.cjs");
2
+ const require_load = require("./load-Ddl3iCSC.cjs");
3
3
  let node_fs = require("node:fs");
4
4
  let node_path = require("node:path");
5
5
  let jiti = require("jiti");
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as problemsOf, o as toCatalog, r as formatProblems, t as loadMessages } from "./load-CE9FYddD.mjs";
2
+ import { i as problemsOf, o as toCatalog, r as formatProblems, t as loadMessages } from "./load-CMmjOpu-.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, watch, writeFileSync } from "node:fs";
4
4
  import { dirname, join, relative, resolve } from "node:path";
5
5
  import { createJiti } from "jiti";
package/dist/generate.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_load = require("./load-dVzjsBK6.cjs");
2
+ const require_load = require("./load-Ddl3iCSC.cjs");
3
3
  //#region src/config.ts
4
4
  /**
5
5
  * Declares where the messages are, and what `kizuna-i18n generate` writes from them.
@@ -62,29 +62,33 @@ function defineTarget(definition) {
62
62
  * messages it reads.
63
63
  */
64
64
  const runtimeSource = String.raw`/**
65
- * A message with params. Text values give a string. A rich value, like a React element, gives the
66
- * message as parts, which React renders directly.
65
+ * A message with params. A React element as a param returns parts in place of a string.
67
66
  */
68
67
  export type Message<Params> = {
69
68
  (params: Params): string;
70
- <Rich>(params: { [Name in keyof Params]: Params[Name] | Rich }): Array<string | Rich>;
69
+ <Rich extends object>(params: { [Name in keyof Params]: Params[Name] | Rich }): Array<string | Rich>;
71
70
  };
72
71
 
73
72
  /**
74
- * A message with tags. Each tag takes a renderer, which gets the text inside the tag and returns
75
- * what the tag becomes, like a link.
73
+ * A message with tags. Pass a function for each tag.
76
74
  */
77
- export type TaggedMessage<Params, Tags extends string> = <Result>(
78
- params: { [Name in keyof Params]: Params[Name] | Result } & {
79
- [Tag in Tags]: (text: string | Array<string | Result>) => Result;
80
- }
81
- ) => Array<string | Result>;
75
+ export type TaggedMessage<Params, Tags extends string> = {
76
+ <Result>(
77
+ params: Params & {
78
+ [Tag in Tags]: (text: string | Array<string | Result>) => Result;
79
+ }
80
+ ): Array<string | Result>;
81
+ <Result, Rich extends object>(
82
+ params: { [Name in keyof Params]: Params[Name] | Rich } & {
83
+ [Tag in Tags]: (text: string | Array<string | Rich | Result>) => Result;
84
+ }
85
+ ): Array<string | Rich | Result>;
86
+ };
82
87
 
83
88
  const cache = new Map<Locale, Translations>();
84
89
 
85
90
  /**
86
- * Returns the translations of a language. A language the app does not have gives the base
87
- * language.
91
+ * Returns the translations of a language.
88
92
  *
89
93
  * @example
90
94
  * const t = getTranslations('nb');
@@ -105,8 +109,8 @@ const sameLanguages: Record<string, string[]> = {
105
109
  };
106
110
 
107
111
  /**
108
- * Returns the language the app has that best matches the user's preferred languages, or the base
109
- * language. Takes an Accept-Language header or a list like navigator.languages.
112
+ * Returns the language that best matches an Accept-Language header or a list like
113
+ * navigator.languages, or the base language.
110
114
  *
111
115
  * @example
112
116
  * matchLocale(['nb-NO', 'en-US']);
@@ -150,8 +154,7 @@ const TAG_PAIR = '<(\\w+)>([\\s\\S]*?)<\\/\\1>';
150
154
  const PARAM = '\\{\\s*([A-Za-z_$][\\w$]*)\\s*\\}';
151
155
 
152
156
  /**
153
- * The marks React puts on its elements, so a part that is an element gets a key without importing
154
- * React.
157
+ * Marks React puts on its elements, so parts get keys without importing React.
155
158
  */
156
159
  const reactElements = new Set<symbol>([Symbol.for('react.element'), Symbol.for('react.transitional.element')]);
157
160
 
@@ -161,7 +164,9 @@ function text(template: string): any {
161
164
 
162
165
  function render(template: string, values: Record<string, unknown>): string | unknown[] {
163
166
  const hasTag = new RegExp(TAG_PAIR).test(template);
164
- const hasRichValue = Object.values(values).some((value) => typeof value !== 'string' && typeof value !== 'function');
167
+ const hasRichValue = Object.values(values).some(
168
+ (value) => typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'function'
169
+ );
165
170
  if (!hasTag && !hasRichValue) {
166
171
  return template.replace(new RegExp(PARAM, 'g'), (_, name: string) => String(values[name] ?? ''));
167
172
  }
@@ -199,8 +204,8 @@ function pushValues(parts: unknown[], stretch: string, values: Record<string, un
199
204
  while ((match = param.exec(stretch))) {
200
205
  pushText(parts, stretch.slice(lastIndex, match.index));
201
206
  const value = values[match[1] ?? ''] ?? '';
202
- if (typeof value === 'string') {
203
- pushText(parts, value);
207
+ if (typeof value === 'string' || typeof value === 'number') {
208
+ pushText(parts, String(value));
204
209
  } else {
205
210
  parts.push(value);
206
211
  }
@@ -249,27 +254,33 @@ function filledOf(segments, values) {
249
254
  return segments.map((segment) => {
250
255
  if (segment.type === "text") return segment.text;
251
256
  if (segment.type === "param") return values[segment.name] ?? "";
252
- return filledOf(segment.children, values);
257
+ return `<${segment.name}>${filledOf(segment.children, values)}</${segment.name}>`;
253
258
  }).join("");
254
259
  }
255
- function exampleOf(message, base) {
260
+ function textsOf(message, catalog, values) {
261
+ return catalog.locales.map((locale) => {
262
+ const text = message.translations[locale.name];
263
+ if (text === void 0) return `// ${locale.name}: shows ${require_load.shownLocaleOf(catalog, message.translations, locale.name)}`;
264
+ return `// ${locale.name}: ${stringOf(filledOf(text.segments, values))}`;
265
+ });
266
+ }
267
+ function exampleOf(message, catalog) {
256
268
  const access = `t.${message.path.map(keyOf).join(".")}`;
257
- const baseText = message.translations[base];
258
- if (message.params.length === 0 && message.tags.length === 0) return [`${access}; // ${stringOf(baseText?.source ?? "")}`];
259
- const values = Object.fromEntries(message.params.map((name) => [name, message.examples?.[name] ?? "…"]));
260
- const lines = [
269
+ const values = Object.fromEntries(message.params.map((param) => [param.name, param.example === void 0 ? "…" : String(param.example)]));
270
+ if (message.params.length === 0 && message.tags.length === 0) return [`${access};`, ...textsOf(message, catalog, values)];
271
+ return [
261
272
  `${access}({`,
262
- ...message.params.map((name) => ` ${keyOf(name)}: ${stringOf(values[name])},`),
263
- ...message.tags.map((tag) => ` ${keyOf(tag)}: (text) => text,`)
273
+ ...message.params.map((param) => ` ${keyOf(param.name)}: ${typeof param.example === "number" ? String(param.example) : stringOf(values[param.name])},`),
274
+ ...message.tags.map((tag) => ` ${keyOf(tag)}: (text) => text,`),
275
+ "});",
276
+ ...textsOf(message, catalog, values)
264
277
  ];
265
- const result = message.tags.length === 0 ? ` // ${stringOf(filledOf(baseText?.segments ?? [], values))}` : "";
266
- return [...lines, `});${result}`];
267
278
  }
268
- function docOf(message, base, indent) {
279
+ function docOf(message, catalog, indent) {
269
280
  const paragraphs = [];
270
281
  if (message.description !== void 0) paragraphs.push(commentOf(message.description).split("\n"));
271
282
  if (message.maxLength !== void 0) paragraphs.push([`@maxLength ${message.maxLength}`]);
272
- paragraphs.push(["@example", ...exampleOf(message, base).map(commentOf)]);
283
+ paragraphs.push(["@example", ...exampleOf(message, catalog).map(commentOf)]);
273
284
  const body = paragraphs.flatMap((lines, index) => [...index === 0 ? [] : [""], ...lines]);
274
285
  return [
275
286
  `${indent}/**`,
@@ -279,7 +290,7 @@ function docOf(message, base, indent) {
279
290
  }
280
291
  function typeOf(message) {
281
292
  if (message.params.length === 0 && message.tags.length === 0) return ["string"];
282
- const params = message.params.map((name) => ` ${keyOf(name)}: string;`);
293
+ const params = message.params.map((param) => ` ${keyOf(param.name)}: ${param.type};`);
283
294
  if (message.tags.length === 0) return [
284
295
  "Message<{",
285
296
  ...params,
@@ -292,48 +303,66 @@ function typeOf(message) {
292
303
  `}, ${tags}>`
293
304
  ];
294
305
  }
295
- const groupsOf = (catalog) => {
296
- const groups = /* @__PURE__ */ new Map();
306
+ function treeOf(catalog) {
307
+ const root = /* @__PURE__ */ new Map();
297
308
  for (const message of catalog.messages) {
298
- const name = message.path[0];
299
- groups.set(name, [...groups.get(name) ?? [], message]);
309
+ let branch = root;
310
+ for (const name of message.path.slice(0, -1)) {
311
+ let next = branch.get(name);
312
+ if (!(next instanceof Map)) {
313
+ next = /* @__PURE__ */ new Map();
314
+ branch.set(name, next);
315
+ }
316
+ branch = next;
317
+ }
318
+ branch.set(message.path[message.path.length - 1], message);
300
319
  }
301
- return groups;
302
- };
320
+ return root;
321
+ }
322
+ function typeLinesOf(branch, catalog, indent) {
323
+ return [...branch].flatMap(([name, node]) => {
324
+ if (node instanceof Map) return [
325
+ `${indent}${keyOf(name)}: {`,
326
+ ...typeLinesOf(node, catalog, `${indent} `),
327
+ `${indent}};`
328
+ ];
329
+ const [first = "string", ...rest] = typeOf(node);
330
+ return [
331
+ ...docOf(node, catalog, indent),
332
+ `${indent}${keyOf(name)}: ${first}${rest.length === 0 ? ";" : ""}`,
333
+ ...rest.map((line, index) => `${indent}${line}${index === rest.length - 1 ? ";" : ""}`)
334
+ ];
335
+ });
336
+ }
337
+ function valueLinesOf(branch, catalog, locale, indent) {
338
+ return [...branch].flatMap(([name, node]) => {
339
+ if (node instanceof Map) return [
340
+ `${indent}${keyOf(name)}: {`,
341
+ ...valueLinesOf(node, catalog, locale, `${indent} `),
342
+ `${indent}},`
343
+ ];
344
+ const shown = require_load.shownLocaleOf(catalog, node.translations, locale);
345
+ const source = node.translations[shown]?.source ?? "";
346
+ const value = node.params.length === 0 && node.tags.length === 0 ? stringOf(source) : `text(${stringOf(source)})`;
347
+ return [`${indent}${keyOf(name)}: ${value},`];
348
+ });
349
+ }
303
350
  function translationsTypeOf(catalog) {
304
- const lines = [
351
+ return [
305
352
  "/**",
306
353
  " * The translations of one language, as `getTranslations` returns them.",
307
354
  " */",
308
- "export type Translations = {"
355
+ "export type Translations = {",
356
+ ...typeLinesOf(treeOf(catalog), catalog, " "),
357
+ "};"
309
358
  ];
310
- for (const [group, messages] of groupsOf(catalog)) {
311
- lines.push(` ${keyOf(group)}: {`);
312
- for (const message of messages) {
313
- const [first = "string", ...rest] = typeOf(message);
314
- lines.push(...docOf(message, catalog.base, " "));
315
- lines.push(` ${keyOf(message.path[1])}: ${first}${rest.length === 0 ? ";" : ""}`);
316
- rest.forEach((line, index) => lines.push(` ${line}${index === rest.length - 1 ? ";" : ""}`));
317
- }
318
- lines.push(" };");
319
- }
320
- lines.push("};");
321
- return lines;
322
359
  }
323
360
  function translationsOfLocale(catalog, locale) {
324
- const lines = [` ${keyOf(locale)}: () => ({`];
325
- for (const [group, messages] of groupsOf(catalog)) {
326
- lines.push(` ${keyOf(group)}: {`);
327
- for (const message of messages) {
328
- const shown = require_load.shownLocaleOf(catalog, message.translations, locale);
329
- const source = message.translations[shown]?.source ?? "";
330
- const value = message.params.length === 0 && message.tags.length === 0 ? stringOf(source) : `text(${stringOf(source)})`;
331
- lines.push(` ${keyOf(message.path[1])}: ${value},`);
332
- }
333
- lines.push(" },");
334
- }
335
- lines.push(" }),");
336
- return lines;
361
+ return [
362
+ ` ${keyOf(locale)}: () => ({`,
363
+ ...valueLinesOf(treeOf(catalog), catalog, locale, " "),
364
+ " }),"
365
+ ];
337
366
  }
338
367
  function render(catalog) {
339
368
  const names = catalog.locales.map((locale) => locale.name);
@@ -1,4 +1,4 @@
1
- import { n as MessagesSource, t as LocaleDefinition } from "./source-CAF21cuM.cjs";
1
+ import { n as MessagesSource, r as ParamDefinition, t as LocaleDefinition } from "./source-C6_RixNW.cjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/segments.d.ts
@@ -31,6 +31,15 @@ type CatalogText = {
31
31
  */
32
32
  segments: Segment[];
33
33
  };
34
+ /**
35
+ * One param of a message.
36
+ */
37
+ type CatalogParam = {
38
+ /**
39
+ * The name the texts use, like `firstName` for `{firstName}`.
40
+ */
41
+ name: string;
42
+ } & ParamDefinition;
34
43
  /**
35
44
  * One message, with every language that wrote it.
36
45
  */
@@ -52,13 +61,9 @@ type CatalogMessage = {
52
61
  */
53
62
  maxLength?: number;
54
63
  /**
55
- * Sample values for the params.
56
- */
57
- examples?: Record<string, string>;
58
- /**
59
- * Every param, in the order they first appear in the base language.
64
+ * Every param, in the order the message declares them.
60
65
  */
61
- params: string[];
66
+ params: CatalogParam[];
62
67
  /**
63
68
  * Every tag, in the order they first appear in the base language.
64
69
  */
@@ -111,8 +116,8 @@ type Problem = {
111
116
  severity: 'error' | 'notice';
112
117
  };
113
118
  /**
114
- * Lists every problem in the messages: a missing language, a wrong param or tag, a text over its
115
- * length limit, and each language that shows its fallback's text.
119
+ * Lists every problem in the messages: a missing language, a param the message does not declare, a
120
+ * wrong tag, a text over its length limit, and each language that shows its fallback's text.
116
121
  */
117
122
  declare function problemsOf(source: MessagesSource): Problem[];
118
123
  /**
@@ -259,4 +264,4 @@ declare const typescriptTarget: (options: {
259
264
  output: string;
260
265
  }) => Target;
261
266
  //#endregion
262
- export { type Catalog, type CatalogMessage, type CatalogText, type I18nConfig, type LocaleDefinition, type MessagesSource, type Problem, type Segment, type Target, type TargetContext, defineConfig, defineTarget, formatProblems, loadMessages, problemsOf, sourceOf, toCatalog, typescriptTarget };
267
+ export { type Catalog, type CatalogMessage, type CatalogParam, type CatalogText, type I18nConfig, type LocaleDefinition, type MessagesSource, type Problem, type Segment, type Target, type TargetContext, defineConfig, defineTarget, formatProblems, loadMessages, problemsOf, sourceOf, toCatalog, typescriptTarget };
@@ -1,4 +1,4 @@
1
- import { n as MessagesSource, t as LocaleDefinition } from "./source-DJMnQ2hS.mjs";
1
+ import { n as MessagesSource, r as ParamDefinition, t as LocaleDefinition } from "./source-Cu0aGXpT.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/segments.d.ts
@@ -31,6 +31,15 @@ type CatalogText = {
31
31
  */
32
32
  segments: Segment[];
33
33
  };
34
+ /**
35
+ * One param of a message.
36
+ */
37
+ type CatalogParam = {
38
+ /**
39
+ * The name the texts use, like `firstName` for `{firstName}`.
40
+ */
41
+ name: string;
42
+ } & ParamDefinition;
34
43
  /**
35
44
  * One message, with every language that wrote it.
36
45
  */
@@ -52,13 +61,9 @@ type CatalogMessage = {
52
61
  */
53
62
  maxLength?: number;
54
63
  /**
55
- * Sample values for the params.
56
- */
57
- examples?: Record<string, string>;
58
- /**
59
- * Every param, in the order they first appear in the base language.
64
+ * Every param, in the order the message declares them.
60
65
  */
61
- params: string[];
66
+ params: CatalogParam[];
62
67
  /**
63
68
  * Every tag, in the order they first appear in the base language.
64
69
  */
@@ -111,8 +116,8 @@ type Problem = {
111
116
  severity: 'error' | 'notice';
112
117
  };
113
118
  /**
114
- * Lists every problem in the messages: a missing language, a wrong param or tag, a text over its
115
- * length limit, and each language that shows its fallback's text.
119
+ * Lists every problem in the messages: a missing language, a param the message does not declare, a
120
+ * wrong tag, a text over its length limit, and each language that shows its fallback's text.
116
121
  */
117
122
  declare function problemsOf(source: MessagesSource): Problem[];
118
123
  /**
@@ -259,4 +264,4 @@ declare const typescriptTarget: (options: {
259
264
  output: string;
260
265
  }) => Target;
261
266
  //#endregion
262
- export { type Catalog, type CatalogMessage, type CatalogText, type I18nConfig, type LocaleDefinition, type MessagesSource, type Problem, type Segment, type Target, type TargetContext, defineConfig, defineTarget, formatProblems, loadMessages, problemsOf, sourceOf, toCatalog, typescriptTarget };
267
+ export { type Catalog, type CatalogMessage, type CatalogParam, type CatalogText, type I18nConfig, type LocaleDefinition, type MessagesSource, type Problem, type Segment, type Target, type TargetContext, defineConfig, defineTarget, formatProblems, loadMessages, problemsOf, sourceOf, toCatalog, typescriptTarget };