intor 2.3.17 → 2.3.18

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.
@@ -1,11 +1,12 @@
1
1
  import type { LocaleResolver, IntorValue } from "./types";
2
2
  import type { IntorRuntimeOptions } from "../runtime";
3
3
  import type { IntorResolvedConfig } from "../../config";
4
- import { type GenConfigKeys, type GenLocale } from "../../core";
4
+ import type { Locale } from "intor-translator";
5
+ import { type GenConfigKeys } from "../../core";
5
6
  /**
6
7
  * Initializes Intor for the current execution context.
7
8
  *
8
9
  * Produces a server-side snapshot for SSR and
9
10
  * full-stack rendering environments.
10
11
  */
11
- export declare function intor<CK extends GenConfigKeys = "__default__">(config: IntorResolvedConfig, localeOrResolver: LocaleResolver<CK> | GenLocale<CK>, options?: IntorRuntimeOptions): Promise<IntorValue<CK>>;
12
+ export declare function intor<CK extends GenConfigKeys = "__default__">(config: IntorResolvedConfig, localeOrResolver: LocaleResolver | Locale, options?: IntorRuntimeOptions): Promise<IntorValue<CK>>;
@@ -1,6 +1,7 @@
1
1
  import type { IntorResolvedConfig } from "../../config";
2
+ import type { Locale } from "intor-translator";
2
3
  import { type GenConfigKeys, type GenLocale, type GenMessages } from "../../core";
3
- export type LocaleResolver<CK extends GenConfigKeys = "__default__"> = (config: IntorResolvedConfig) => GenLocale<CK> | Promise<GenLocale<CK>>;
4
+ export type LocaleResolver = (config: IntorResolvedConfig) => Locale | Promise<Locale>;
4
5
  export interface IntorValue<CK extends GenConfigKeys = "__default__"> {
5
6
  config: IntorResolvedConfig;
6
7
  locale: GenLocale<CK>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intor",
3
- "version": "2.3.17",
3
+ "version": "2.3.18",
4
4
  "description": "The i18n library for modern JavaScript",
5
5
  "author": "Yiming Liao",
6
6
  "homepage": "https://github.com/yiming-liao/intor#readme",