nz-bytes.pipe.d.ts 942 B

12345678910111213141516171819202122
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { PipeTransform } from '@angular/core';
  6. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  7. import * as i0 from "@angular/core";
  8. export type ByteUnit = 'B' | 'kB' | 'KB' | 'MB' | 'GB' | 'TB';
  9. export declare class NzBytesPipe implements PipeTransform {
  10. static formats: Record<ByteUnit, {
  11. max: number;
  12. prev?: ByteUnit;
  13. }>;
  14. transform(input: NzSafeAny, decimal?: number, from?: ByteUnit, to?: ByteUnit): NzSafeAny;
  15. static formatResult(result: number, unit: string): string;
  16. static calculateResult(format: {
  17. max: number;
  18. prev?: ByteUnit;
  19. }, bytes: number): number;
  20. static ɵfac: i0.ɵɵFactoryDeclaration<NzBytesPipe, never>;
  21. static ɵpipe: i0.ɵɵPipeDeclaration<NzBytesPipe, "nzBytes", true>;
  22. }