@types/columnify
TypeScript icon, indicating that this package has built-in type declarations

1.5.4 • Public • Published

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 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Gary King.

/@types/columnify/

    Package Sidebar

    Install

    npm i @types/columnify

    Weekly Downloads

    8,333

    Version

    1.5.4

    License

    MIT

    Unpacked Size

    4.66 kB

    Total Files

    5

    Last publish

    Collaborators

    • types