npm.io
1.5.4 • Published 3 years ago

@types/columnify

Licence
MIT
Version
1.5.4
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
51.5K

Installation

npm install --save @types/columnify

Summary

This package contains type definitions for columnify (https://github.com/timoxley/columnify).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/columnify.

index.d.ts

declare function columnify(data: Record<string, any> | any[], options?: columnify.GlobalOptions): string;

declare namespace columnify {
    interface Options {
        align?: "left" | "center" | "centre" | "right" | undefined;
        dataTransform?: ((data: string) => string) | undefined;
        headingTransform?: ((data: string) => string) | undefined;
        minWidth?: number | undefined;
        maxWidth?: number | undefined;
        paddingChr?: string | undefined;
        preserveNewLines?: boolean | undefined;
        showHeaders?: boolean | undefined;
        truncateMarker?: string | undefined;
    }

    interface GlobalOptions extends Options {
        columns?: string[] | undefined;
        columnSplitter?: string | undefined;
        config?: {
            [columnName: string]: Options;
        } | undefined;
        maxLineWidth?: number | undefined;
        truncate?: boolean | undefined;
        widths?: {
            [columnName: string]: Pick<Options, "minWidth" | "maxWidth">;
        } | undefined;
    }
}

export = columnify;

Additional Details

  • Last updated: Mon, 06 Nov 2023 2205 GMT
  • Dependencies: none

Credits

These definitions were written by Gary King.