@i18n-micro/types 1.2.13 → 1.2.15

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/index.d.cts CHANGED
@@ -11,10 +11,11 @@ export interface DefineLocaleMessage {
11
11
  /**
12
12
  * Resolved translation key type.
13
13
  * - When `DefineLocaleMessage` is empty (generator not connected) — resolves to `string`.
14
- * - When `DefineLocaleMessage` has keys — resolves to a union of those keys **and** `string`,
15
- * providing autocompletion while still allowing dynamic keys.
14
+ * - When `DefineLocaleMessage` has keys — resolves to a union of those keys **and**
15
+ * `(string & {})`, providing autocompletion while still allowing dynamic keys
16
+ * (plain `| string` would collapse the union to `string`).
16
17
  */
17
- export type TranslationKey = keyof DefineLocaleMessage extends never ? string : keyof DefineLocaleMessage | string;
18
+ export type TranslationKey = Exclude<keyof DefineLocaleMessage, '__augmentation'> extends never ? string : Exclude<keyof DefineLocaleMessage, '__augmentation'> | (string & {});
18
19
  /**
19
20
  * Helper for creating typed prefixes.
20
21
  * Allows safe usage of dynamic keys.
@@ -376,6 +377,13 @@ export interface ModuleOptions {
376
377
  * @default ['page', 'sort', 'filter', 'search', 'q', 'query', 'tag']
377
378
  */
378
379
  canonicalQueryWhitelist?: string[];
380
+ /**
381
+ * Trailing slash for `$localePath` / `$switchLocalePath` (NuxtLink parity).
382
+ * Defaults to `experimental.defaults.nuxtLink.trailingSlash` when unset.
383
+ * Set explicitly to override Nuxt's link default for i18n path helpers.
384
+ * @default undefined (inherit from Nuxt)
385
+ */
386
+ trailingSlash?: 'append' | 'remove';
379
387
  /**
380
388
  * URL patterns (strings or RegExp) to exclude from i18n processing entirely.
381
389
  * Matching routes won't get locale prefixes, redirects, or translation loading.
package/dist/index.d.ts CHANGED
@@ -11,10 +11,11 @@ export interface DefineLocaleMessage {
11
11
  /**
12
12
  * Resolved translation key type.
13
13
  * - When `DefineLocaleMessage` is empty (generator not connected) — resolves to `string`.
14
- * - When `DefineLocaleMessage` has keys — resolves to a union of those keys **and** `string`,
15
- * providing autocompletion while still allowing dynamic keys.
14
+ * - When `DefineLocaleMessage` has keys — resolves to a union of those keys **and**
15
+ * `(string & {})`, providing autocompletion while still allowing dynamic keys
16
+ * (plain `| string` would collapse the union to `string`).
16
17
  */
17
- export type TranslationKey = keyof DefineLocaleMessage extends never ? string : keyof DefineLocaleMessage | string;
18
+ export type TranslationKey = Exclude<keyof DefineLocaleMessage, '__augmentation'> extends never ? string : Exclude<keyof DefineLocaleMessage, '__augmentation'> | (string & {});
18
19
  /**
19
20
  * Helper for creating typed prefixes.
20
21
  * Allows safe usage of dynamic keys.
@@ -376,6 +377,13 @@ export interface ModuleOptions {
376
377
  * @default ['page', 'sort', 'filter', 'search', 'q', 'query', 'tag']
377
378
  */
378
379
  canonicalQueryWhitelist?: string[];
380
+ /**
381
+ * Trailing slash for `$localePath` / `$switchLocalePath` (NuxtLink parity).
382
+ * Defaults to `experimental.defaults.nuxtLink.trailingSlash` when unset.
383
+ * Set explicitly to override Nuxt's link default for i18n path helpers.
384
+ * @default undefined (inherit from Nuxt)
385
+ */
386
+ trailingSlash?: 'append' | 'remove';
379
387
  /**
380
388
  * URL patterns (strings or RegExp) to exclude from i18n processing entirely.
381
389
  * Matching routes won't get locale prefixes, redirects, or translation loading.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-micro/types",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "TypeScript definitions for the Nuxt I18n Micro ecosystem.",
5
5
  "keywords": [
6
6
  "i18n",