From 4e87195739f2a5d9a05451b48773c8afdc680765 Mon Sep 17 00:00:00 2001 From: akiyamn Date: Sun, 24 Sep 2023 23:22:21 +1000 Subject: Initial commit (by create-cloudflare CLI) --- node_modules/as-table/as-table.d.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 node_modules/as-table/as-table.d.ts (limited to 'node_modules/as-table/as-table.d.ts') diff --git a/node_modules/as-table/as-table.d.ts b/node_modules/as-table/as-table.d.ts new file mode 100644 index 0000000..5e31996 --- /dev/null +++ b/node_modules/as-table/as-table.d.ts @@ -0,0 +1,32 @@ + +declare function asTable(rows: any[][]): string +declare function asTable(objects: {[column: string]: any}[]): string +declare namespace asTable { + interface Config { + maxTotalWidth: number + minColumnWidths?: number[] + delimiter?: string + dash: string + right: boolean + print(value: T, key?: string | number): string + title(value: string): string + } + type OmitPrint = Pick> & {print: undefined} + type ValidValueType = { + [P in keyof O]: T; + } + interface Formatter extends Readonly> { + (rows: T[][]): string + >(objects: O[]): string + configure(cfg: Partial>>): Formatter + configure(cfg: Partial>): Formatter + } + function configure(cfg: Partial>): Formatter + const maxTotalWidth: number + const print: StringConstructor + const title: StringConstructor + const dash: '-' + const right: false +} + +export = asTable -- cgit v1.2.3