@mmstack/translate 19.3.5 → 19.3.7

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.
@@ -0,0 +1,25 @@
1
+ import type { WithParams } from './parameterize.type';
2
+ /**
3
+ * Power-user escape hatch for ICU messages whose parameters can't be inferred
4
+ * from the message string — typically variables nested inside `plural` /
5
+ * `select` / `selectordinal` arms, which the type-level extractor skips.
6
+ *
7
+ * Declared params are merged with auto-extracted ones; on key conflict, the
8
+ * declared params win. Non-default locales for a key wrapped with `withParams`
9
+ * may be plain strings — they don't need to repeat the wrapper.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const ns = createNamespace('quote', {
14
+ * // auto-extracts `count`; `name` is declared explicitly because it
15
+ * // lives inside the plural arms and can't be inferred
16
+ * stats: withParams<{ name: string }>(
17
+ * '{count, plural, one {1 quote from {name}} other {# quotes from {name}}}',
18
+ * ),
19
+ * });
20
+ *
21
+ * // t inferred as: (key, { count: number; name: string }) => string
22
+ * t('quote.stats', { count: 3, name: 'Alice' });
23
+ * ```
24
+ */
25
+ export declare function withParams<const P extends Record<string, unknown>, const S extends string = string>(message: S): WithParams<P, S>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmstack/translate",
3
- "version": "19.3.5",
3
+ "version": "19.3.7",
4
4
  "keywords": [
5
5
  "angular",
6
6
  "localize",