@obliczeniowo/elementary
Version:
Library made in Angular version 19
24 lines (23 loc) • 885 B
TypeScript
import { PipeTransform } from '@angular/core';
import { TranslationPipe } from '@obliczeniowo/elementary/text-pipes';
import * as i0 from "@angular/core";
export interface UnitsPipeOptions {
precision?: number;
type?: 'basic' | 'fullInteger' | 'decimal' | 'fullDecimal';
translations?: {
[en: string]: string;
} | 'phonetic';
}
/**
* Transform number from '12345' to '12.35 k'
* Can use basic units: [k, M, G, ...]
* Or in fullInteger type: [da, h, k, M, ...]
* Ot in decimal type: [..., m, , k, ...]
* Ot in fullDecimal type: [..., m, c, d, , da, h, k, ...]
*/
export declare class UnitsPipe implements PipeTransform {
translate: TranslationPipe;
transform(value: number, options?: UnitsPipeOptions): string;
static ɵfac: i0.ɵɵFactoryDeclaration<UnitsPipe, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<UnitsPipe, "oblUnits", true>;
}