ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
22 lines (21 loc) • 801 B
TypeScript
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
import { PipeTransform } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
export declare type ByteUnit = 'B' | 'kB' | 'KB' | 'MB' | 'GB' | 'TB';
export declare class NzBytesPipe implements PipeTransform {
static formats: {
[key: string]: {
max: number;
prev?: ByteUnit;
};
};
transform(input: NzSafeAny, decimal?: number, from?: ByteUnit, to?: ByteUnit): NzSafeAny;
static formatResult(result: number, unit: string): string;
static calculateResult(format: {
max: number;
prev?: ByteUnit;
}, bytes: number): number;
}