@inglorious/i18n 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/types/index.d.ts +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/i18n",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Internationalization for Inglorious Web: an i18next instance driven by a store entity.",
5
5
  "author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@inglorious/eslint-config": "1.1.2",
41
- "@inglorious/store": "11.0.3",
41
+ "@inglorious/store": "11.0.4",
42
42
  "prettier": "^3.9.6",
43
43
  "vitest": "^5.0.0"
44
44
  },
package/types/index.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  import type { i18n, InitOptions, Resource, TOptions } from "i18next"
2
2
 
3
- /** A catalogue file as a glob gives it: the module, or a function loading it. */
4
- export type CatalogueEntry =
5
- Record<string, unknown> | (() => Promise<Record<string, unknown>>)
3
+ /**
4
+ * A catalogue file as a glob gives it: the module, or a function loading it.
5
+ * As loose as Vite's own types for `import.meta.glob`, which leave the
6
+ * module `unknown`.
7
+ */
8
+ export type CatalogueEntry = unknown
6
9
 
7
10
  export interface I18nOptions {
8
11
  /**
@@ -54,7 +57,9 @@ export interface I18nEntity {
54
57
  isUnsaved?: boolean
55
58
  }
56
59
 
57
- export interface LanguageOption {
60
+ // A type alias rather than an interface, so it fits option types that allow
61
+ // extra fields, such as Inglorious UI's `SelectOption`.
62
+ export type LanguageOption = {
58
63
  value: string
59
64
  /** The language in itself: "Italiano", "Français". */
60
65
  label: string