芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/react-intl/src/types.ts
/* * Copyright 2015, Yahoo Inc. * Copyrights licensed under the New BSD License. * See the accompanying LICENSE file for terms. */ import * as React from 'react' import IntlMessageFormat, { Formats, PrimitiveType, FormatXMLElementFn, FormatError, } from 'intl-messageformat' import IntlRelativeTimeFormat, { IntlRelativeTimeFormatOptions, } from '@formatjs/intl-relativetimeformat' import {MessageFormatElement} from 'intl-messageformat-parser' import {UnifiedNumberFormatOptions} from '@formatjs/intl-unified-numberformat' import IntlListFormat, {IntlListFormatOptions} from '@formatjs/intl-listformat' import {DisplayNames, DisplayNamesOptions} from '@formatjs/intl-displaynames' import {ReactIntlError} from './error' export interface IntlConfig { locale: string timeZone?: string formats: CustomFormats textComponent?: React.ComponentType | keyof React.ReactHTML messages: Record
| Record
defaultLocale: string defaultFormats: CustomFormats wrapRichTextChunksInFragment?: boolean onError(err: ReactIntlError | FormatError): void } export interface CustomFormats extends Partial
{ relative?: Record
} export interface CustomFormatConfig { format?: string } export type FormatDateOptions = Exclude< Intl.DateTimeFormatOptions, 'localeMatcher' > & CustomFormatConfig export type FormatNumberOptions = Exclude< UnifiedNumberFormatOptions, 'localeMatcher' > & CustomFormatConfig export type FormatRelativeTimeOptions = Exclude< IntlRelativeTimeFormatOptions, 'localeMatcher' > & CustomFormatConfig export type FormatPluralOptions = Exclude< Intl.PluralRulesOptions, 'localeMatcher' > & CustomFormatConfig export type FormatListOptions = Exclude
export type FormatDisplayNameOptions = Exclude< DisplayNamesOptions, 'localeMatcher' > export interface IntlFormatters
{ formatDate( value: Parameters
[0] | string, opts?: FormatDateOptions ): string formatTime( value: Parameters
[0] | string, opts?: FormatDateOptions ): string formatDateToParts( value: Parameters
[0] | string, opts?: FormatDateOptions ): Intl.DateTimeFormatPart[] formatTimeToParts( value: Parameters
[0] | string, opts?: FormatDateOptions ): Intl.DateTimeFormatPart[] formatRelativeTime( value: Parameters
[0], unit?: Parameters
[1], opts?: FormatRelativeTimeOptions ): string formatNumber( value: Parameters
[0], opts?: FormatNumberOptions ): string formatNumberToParts( value: Parameters
[0], opts?: FormatNumberOptions ): Intl.NumberFormatPart[] formatPlural( value: Parameters
[0], opts?: FormatPluralOptions ): ReturnType
formatMessage( descriptor: MessageDescriptor, values?: Record
): string formatMessage( descriptor: MessageDescriptor, values?: Record< string, PrimitiveType | React.ReactElement | FormatXMLElementFn
> ): string | React.ReactNodeArray formatList(values: Array
, opts?: FormatListOptions): string formatList( values: Array
, opts?: FormatListOptions ): React.ReactNode formatDisplayName( value: Parameters
[0], opts?: FormatDisplayNameOptions ): string | undefined } export interface Formatters { getDateTimeFormat( ...args: ConstructorParameters
): Intl.DateTimeFormat getNumberFormat( ...args: ConstructorParameters
): Intl.NumberFormat getMessageFormat( ...args: ConstructorParameters
): IntlMessageFormat getRelativeTimeFormat( ...args: ConstructorParameters
): IntlRelativeTimeFormat getPluralRules( ...args: ConstructorParameters
): Intl.PluralRules getListFormat( ...args: ConstructorParameters
): IntlListFormat getDisplayNames( ...args: ConstructorParameters
): DisplayNames } export interface IntlShape extends IntlConfig, IntlFormatters { formatters: Formatters } export interface IntlCache { dateTime: Record
number: Record
message: Record
relativeTime: Record
pluralRules: Record
list: Record
displayNames: Record
} export interface MessageDescriptor { id?: string | number description?: string | object defaultMessage?: string } export type Omit
= Pick
>