intl-template 1.0.0-alpha.1 → 1.0.0-alpha.2

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/dist/intl.d.ts CHANGED
@@ -22,14 +22,14 @@ export class Translation {
22
22
  * Translates a string based on the provided locale and strings.
23
23
  *
24
24
  * @param {string} locale - The locale to use for translation.
25
- * @param {string | string[]} strings - The string or array of strings to be translated.
25
+ * @param {TemplateStringsArray | string} strings - The string or array of strings to be translated.
26
26
  * @param {...any} parts - The dynamic parts to be inserted into the translated string.
27
27
  * @returns {Runes} - The translated string with dynamic parts inserted.
28
28
  * @throws {Error} - If the length of the template parts does not match the length of the template.
29
29
  */
30
- translate: (locale: string, strings: string | string[], ...parts: any[]) => Runes;
30
+ translate: (locale: string, strings: TemplateStringsArray | string, ...parts: any[]) => Runes;
31
31
  #private;
32
32
  }
33
33
  export default translation;
34
- export const l10n: (strings: string | string[], ...parts: any[]) => Runes;
34
+ export const l10n: (strings: string | TemplateStringsArray, ...parts: any[]) => Runes;
35
35
  declare const translation: Translation;
package/dist/intl.js CHANGED
@@ -91,7 +91,7 @@ var Translation = /** @class */ (function () {
91
91
  * Translates a string based on the provided locale and strings.
92
92
  *
93
93
  * @param {string} locale - The locale to use for translation.
94
- * @param {string | string[]} strings - The string or array of strings to be translated.
94
+ * @param {TemplateStringsArray | string} strings - The string or array of strings to be translated.
95
95
  * @param {...any} parts - The dynamic parts to be inserted into the translated string.
96
96
  * @returns {Runes} - The translated string with dynamic parts inserted.
97
97
  * @throws {Error} - If the length of the template parts does not match the length of the template.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-template",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.2",
4
4
  "description": "l10n tagged template literals",
5
5
  "type": "module",
6
6
  "main": "dist/intl.js",
package/src/intl.js CHANGED
@@ -78,7 +78,7 @@ export class Translation {
78
78
  * Translates a string based on the provided locale and strings.
79
79
  *
80
80
  * @param {string} locale - The locale to use for translation.
81
- * @param {string | string[]} strings - The string or array of strings to be translated.
81
+ * @param {TemplateStringsArray | string} strings - The string or array of strings to be translated.
82
82
  * @param {...any} parts - The dynamic parts to be inserted into the translated string.
83
83
  * @returns {Runes} - The translated string with dynamic parts inserted.
84
84
  * @throws {Error} - If the length of the template parts does not match the length of the template.