UNPKG

skysync-cli

Version:

SkySync Command Line Interface

29 lines (28 loc) 1.06 kB
import { PagedResult } from '../sdk'; export interface OutputFormatterOptions { outputJson?: boolean; tabSize?: string | number; } export interface OutputOptions { table?: { property: string; header: string; transform?: (val: any) => any; }[]; json?: string[]; } export declare class OutputFormatter { private formatOptions; constructor(formatOptions: OutputFormatterOptions); get outputJson(): boolean; writeTable(obj: any[], options?: OutputOptions): void; writeAllPages<T>(func: (params: any) => Promise<PagedResult<T>>, params?: any, options?: OutputOptions): Promise<void>; writeItem(obj: any, options?: OutputOptions): void; writeSuccess(message: string, force?: boolean): void; writeFailure(message: string, force?: boolean): void; writeWarning(message: string, force?: boolean): void; writeText(output: string): void; private write; private format; toString(obj: any[], options?: OutputOptions, asTable?: boolean): string; }