UNPKG

@singleton-i18n/angular-client

Version:

Singleton client code for Angular 10.

37 lines (36 loc) 1.78 kB
import { PipeTransform, OnDestroy } from '@angular/core'; import { I18nService } from './services/i18n.service'; import { Subscription } from 'rxjs'; import { NumberFormatOptions } from './formatters/number.format.model'; export declare class I18nPipe implements OnDestroy { constructor(); protected value: string; protected lastInput: any; protected onPatternChange: Subscription; protected _dispose(): void; ngOnDestroy(): void; } export declare class NumberFormatPipe extends I18nPipe implements PipeTransform { private i18nService; constructor(i18nService: I18nService); updateValue(value: any, locale?: string, formatOptions?: NumberFormatOptions): void; transform(value: any, formatOptions?: NumberFormatOptions): string | null; } export declare class CurrencyFormatPipe extends I18nPipe implements PipeTransform { private i18nService; constructor(i18nService: I18nService); updateValue(amount: any, currencyCode?: string, locale?: string, formatOptions?: NumberFormatOptions): void; transform(amount: any, currencyCode: string, formatOptions?: NumberFormatOptions): string | null; } export declare class PercentFormatPipe extends I18nPipe implements PipeTransform { private i18nService; constructor(i18nService: I18nService); updateValue(value: any, locale?: string, formatOptions?: NumberFormatOptions): void; transform(value: any, formatOptions?: NumberFormatOptions): string | null; } export declare class DateFormatPipe extends I18nPipe implements PipeTransform { private i18nService; constructor(i18nService: I18nService); updateValue(value: any, pattern: string, timezone?: string, locale?: string): void; transform(value: any, pattern?: string, timezone?: string): string | null; }