Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formatjs/intl

Package Overview
Dependencies
Maintainers
3
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl - npm Package Compare versions

Comparing version 2.6.0 to 2.6.2

2

lib/src/message.d.ts
import { Formatters, MessageDescriptor, CustomFormats, OnErrorFn } from './types';
import { FormatXMLElementFn, PrimitiveType, Formatters as IntlMessageFormatFormatters, Options } from 'intl-messageformat';
import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
export declare type FormatMessageFn<T> = ({ locale, formats, messages, defaultLocale, defaultFormats, fallbackOnEmptyString, onError, timeZone, defaultRichTextElements, }: {
export type FormatMessageFn<T> = ({ locale, formats, messages, defaultLocale, defaultFormats, fallbackOnEmptyString, onError, timeZone, defaultRichTextElements, }: {
locale: string;

@@ -6,0 +6,0 @@ timeZone?: string;

@@ -19,12 +19,10 @@ import { IntlMessageFormat, Formats, FormatXMLElementFn, FormatError, PrimitiveType, Options as IntlMessageFormatOptions } from 'intl-messageformat';

}
declare type _Message = FormatjsIntl.Message;
declare type MessageIds = _Message extends {
ids: string;
} ? _Message['ids'] : string;
declare type _IntlConfig = FormatjsIntl.IntlConfig;
declare type Locale = _IntlConfig extends {
locale: string;
} ? _IntlConfig['locale'] : string;
export declare type OnErrorFn = (err: MissingTranslationError | MessageFormatError | MissingDataError | InvalidConfigError | UnsupportedFormatterError | FormatError) => void;
export declare type OnWarnFn = (warning: string) => void;
type MessageIds = FormatjsIntl.Message extends {
ids: infer T;
} ? T extends string ? T : string : string;
type Locale = FormatjsIntl.IntlConfig extends {
locale: infer T;
} ? T extends string ? T : string : string;
export type OnErrorFn = (err: MissingTranslationError | MessageFormatError | MissingDataError | InvalidConfigError | UnsupportedFormatterError | FormatError) => void;
export type OnWarnFn = (warning: string) => void;
/**

@@ -53,8 +51,8 @@ * Config for intl object.

}
export declare type FormatDateOptions = Omit<Intl.DateTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'date'>;
export declare type FormatNumberOptions = Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'>;
export declare type FormatRelativeTimeOptions = Omit<Intl.RelativeTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'time'>;
export declare type FormatPluralOptions = Omit<Intl.PluralRulesOptions, 'localeMatcher'> & CustomFormatConfig;
export declare type FormatListOptions = Omit<IntlListFormatOptions, 'localeMatcher'>;
export declare type FormatDisplayNameOptions = Omit<DisplayNamesOptions, 'localeMatcher'>;
export type FormatDateOptions = Omit<Intl.DateTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'date'>;
export type FormatNumberOptions = Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'>;
export type FormatRelativeTimeOptions = Omit<Intl.RelativeTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'time'>;
export type FormatPluralOptions = Omit<Intl.PluralRulesOptions, 'localeMatcher'> & CustomFormatConfig;
export type FormatListOptions = Omit<IntlListFormatOptions, 'localeMatcher'>;
export type FormatDisplayNameOptions = Omit<DisplayNamesOptions, 'localeMatcher'>;
/**

@@ -109,4 +107,4 @@ * `TBase` is the type constraints of the rich text element in the formatted output.

}
export declare type IntlConfig<T = string> = Omit<ResolvedIntlConfig<T>, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
export type IntlConfig<T = string> = Omit<ResolvedIntlConfig<T>, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
export {};
//# sourceMappingURL=types.d.ts.map
{
"name": "@formatjs/intl",
"version": "2.6.0",
"version": "2.6.2",
"description": "Internationalize JS apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.",

@@ -32,13 +32,13 @@ "keywords": [

"dependencies": {
"@formatjs/ecma402-abstract": "1.14.0",
"@formatjs/ecma402-abstract": "1.14.2",
"@formatjs/fast-memoize": "1.2.6",
"@formatjs/icu-messageformat-parser": "2.1.11",
"@formatjs/intl-displaynames": "6.2.0",
"@formatjs/intl-listformat": "7.1.4",
"intl-messageformat": "10.2.2",
"@formatjs/icu-messageformat-parser": "2.1.13",
"@formatjs/intl-displaynames": "6.2.2",
"@formatjs/intl-listformat": "7.1.6",
"intl-messageformat": "10.2.4",
"tslib": "2.4.0"
},
"devDependencies": {
"@formatjs/intl-datetimeformat": "6.4.0",
"@formatjs/intl-numberformat": "8.3.0"
"@formatjs/intl-datetimeformat": "6.4.2",
"@formatjs/intl-numberformat": "8.3.2"
},

@@ -45,0 +45,0 @@ "peerDependencies": {

import { Formatters, MessageDescriptor, CustomFormats, OnErrorFn } from './types';
import { FormatXMLElementFn, PrimitiveType, Formatters as IntlMessageFormatFormatters, Options } from 'intl-messageformat';
import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
export declare type FormatMessageFn<T> = ({ locale, formats, messages, defaultLocale, defaultFormats, fallbackOnEmptyString, onError, timeZone, defaultRichTextElements, }: {
export type FormatMessageFn<T> = ({ locale, formats, messages, defaultLocale, defaultFormats, fallbackOnEmptyString, onError, timeZone, defaultRichTextElements, }: {
locale: string;

@@ -6,0 +6,0 @@ timeZone?: string;

@@ -19,12 +19,10 @@ import { IntlMessageFormat, Formats, FormatXMLElementFn, FormatError, PrimitiveType, Options as IntlMessageFormatOptions } from 'intl-messageformat';

}
declare type _Message = FormatjsIntl.Message;
declare type MessageIds = _Message extends {
ids: string;
} ? _Message['ids'] : string;
declare type _IntlConfig = FormatjsIntl.IntlConfig;
declare type Locale = _IntlConfig extends {
locale: string;
} ? _IntlConfig['locale'] : string;
export declare type OnErrorFn = (err: MissingTranslationError | MessageFormatError | MissingDataError | InvalidConfigError | UnsupportedFormatterError | FormatError) => void;
export declare type OnWarnFn = (warning: string) => void;
type MessageIds = FormatjsIntl.Message extends {
ids: infer T;
} ? T extends string ? T : string : string;
type Locale = FormatjsIntl.IntlConfig extends {
locale: infer T;
} ? T extends string ? T : string : string;
export type OnErrorFn = (err: MissingTranslationError | MessageFormatError | MissingDataError | InvalidConfigError | UnsupportedFormatterError | FormatError) => void;
export type OnWarnFn = (warning: string) => void;
/**

@@ -53,8 +51,8 @@ * Config for intl object.

}
export declare type FormatDateOptions = Omit<Intl.DateTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'date'>;
export declare type FormatNumberOptions = Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'>;
export declare type FormatRelativeTimeOptions = Omit<Intl.RelativeTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'time'>;
export declare type FormatPluralOptions = Omit<Intl.PluralRulesOptions, 'localeMatcher'> & CustomFormatConfig;
export declare type FormatListOptions = Omit<IntlListFormatOptions, 'localeMatcher'>;
export declare type FormatDisplayNameOptions = Omit<DisplayNamesOptions, 'localeMatcher'>;
export type FormatDateOptions = Omit<Intl.DateTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'date'>;
export type FormatNumberOptions = Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'>;
export type FormatRelativeTimeOptions = Omit<Intl.RelativeTimeFormatOptions, 'localeMatcher'> & CustomFormatConfig<'time'>;
export type FormatPluralOptions = Omit<Intl.PluralRulesOptions, 'localeMatcher'> & CustomFormatConfig;
export type FormatListOptions = Omit<IntlListFormatOptions, 'localeMatcher'>;
export type FormatDisplayNameOptions = Omit<DisplayNamesOptions, 'localeMatcher'>;
/**

@@ -109,4 +107,4 @@ * `TBase` is the type constraints of the rich text element in the formatted output.

}
export declare type IntlConfig<T = string> = Omit<ResolvedIntlConfig<T>, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
export type IntlConfig<T = string> = Omit<ResolvedIntlConfig<T>, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
export {};
//# sourceMappingURL=types.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc