@lingui/core 4.8.0 → 4.10.0

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
@@ -43,7 +43,7 @@ type MissingMessageEvent = {
43
43
  id: string;
44
44
  };
45
45
  type MissingHandler = string | ((locale: string, id: string) => string);
46
- type setupI18nProps = {
46
+ type I18nProps = {
47
47
  locale?: Locale;
48
48
  locales?: Locales;
49
49
  messages?: AllMessages;
@@ -71,7 +71,7 @@ declare class I18n extends EventEmitter<Events> {
71
71
  private _localeData;
72
72
  private _messages;
73
73
  private _missing?;
74
- constructor(params: setupI18nProps);
74
+ constructor(params: I18nProps);
75
75
  get locale(): string;
76
76
  get locales(): Locales | undefined;
77
77
  get messages(): Messages;
@@ -105,7 +105,7 @@ declare class I18n extends EventEmitter<Events> {
105
105
  date(value: string | Date, format?: Intl.DateTimeFormatOptions): string;
106
106
  number(value: number, format?: Intl.NumberFormatOptions): string;
107
107
  }
108
- declare function setupI18n(params?: setupI18nProps): I18n;
108
+ declare function setupI18n(params?: I18nProps): I18n;
109
109
 
110
110
  declare const defaultLocale = "en";
111
111
  declare function date(locales: Locales, value: string | Date, format?: Intl.DateTimeFormatOptions): string;
package/dist/index.d.mts CHANGED
@@ -43,7 +43,7 @@ type MissingMessageEvent = {
43
43
  id: string;
44
44
  };
45
45
  type MissingHandler = string | ((locale: string, id: string) => string);
46
- type setupI18nProps = {
46
+ type I18nProps = {
47
47
  locale?: Locale;
48
48
  locales?: Locales;
49
49
  messages?: AllMessages;
@@ -71,7 +71,7 @@ declare class I18n extends EventEmitter<Events> {
71
71
  private _localeData;
72
72
  private _messages;
73
73
  private _missing?;
74
- constructor(params: setupI18nProps);
74
+ constructor(params: I18nProps);
75
75
  get locale(): string;
76
76
  get locales(): Locales | undefined;
77
77
  get messages(): Messages;
@@ -105,7 +105,7 @@ declare class I18n extends EventEmitter<Events> {
105
105
  date(value: string | Date, format?: Intl.DateTimeFormatOptions): string;
106
106
  number(value: number, format?: Intl.NumberFormatOptions): string;
107
107
  }
108
- declare function setupI18n(params?: setupI18nProps): I18n;
108
+ declare function setupI18n(params?: I18nProps): I18n;
109
109
 
110
110
  declare const defaultLocale = "en";
111
111
  declare function date(locales: Locales, value: string | Date, format?: Intl.DateTimeFormatOptions): string;
package/dist/index.d.ts CHANGED
@@ -43,7 +43,7 @@ type MissingMessageEvent = {
43
43
  id: string;
44
44
  };
45
45
  type MissingHandler = string | ((locale: string, id: string) => string);
46
- type setupI18nProps = {
46
+ type I18nProps = {
47
47
  locale?: Locale;
48
48
  locales?: Locales;
49
49
  messages?: AllMessages;
@@ -71,7 +71,7 @@ declare class I18n extends EventEmitter<Events> {
71
71
  private _localeData;
72
72
  private _messages;
73
73
  private _missing?;
74
- constructor(params: setupI18nProps);
74
+ constructor(params: I18nProps);
75
75
  get locale(): string;
76
76
  get locales(): Locales | undefined;
77
77
  get messages(): Messages;
@@ -105,7 +105,7 @@ declare class I18n extends EventEmitter<Events> {
105
105
  date(value: string | Date, format?: Intl.DateTimeFormatOptions): string;
106
106
  number(value: number, format?: Intl.NumberFormatOptions): string;
107
107
  }
108
- declare function setupI18n(params?: setupI18nProps): I18n;
108
+ declare function setupI18n(params?: I18nProps): I18n;
109
109
 
110
110
  declare const defaultLocale = "en";
111
111
  declare function date(locales: Locales, value: string | Date, format?: Intl.DateTimeFormatOptions): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/core",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "sideEffects": false,
5
5
  "description": "I18n tools for javascript",
6
6
  "main": "./dist/index.cjs",
@@ -54,12 +54,12 @@
54
54
  ],
55
55
  "dependencies": {
56
56
  "@babel/runtime": "^7.20.13",
57
- "@lingui/message-utils": "4.8.0",
57
+ "@lingui/message-utils": "4.10.0",
58
58
  "unraw": "^3.0.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@lingui/jest-mocks": "*",
62
62
  "unbuild": "2.0.0"
63
63
  },
64
- "gitHead": "1b3a1209b06e9a6b6820ce54064da87052c21fa5"
64
+ "gitHead": "5088feb92de2a669659e85067c2849331122e830"
65
65
  }