mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 18:39:19 +02:00
Initial commit (by create-cloudflare CLI)
This commit is contained in:
commit
58a42872a0
1745 changed files with 741893 additions and 0 deletions
32
node_modules/as-table/as-table.d.ts
generated
vendored
Normal file
32
node_modules/as-table/as-table.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
declare function asTable(rows: any[][]): string
|
||||
declare function asTable(objects: {[column: string]: any}[]): string
|
||||
declare namespace asTable {
|
||||
interface Config<T> {
|
||||
maxTotalWidth: number
|
||||
minColumnWidths?: number[]
|
||||
delimiter?: string
|
||||
dash: string
|
||||
right: boolean
|
||||
print(value: T, key?: string | number): string
|
||||
title(value: string): string
|
||||
}
|
||||
type OmitPrint<T> = Pick<T, Exclude<keyof T, 'print'>> & {print: undefined}
|
||||
type ValidValueType<O, T> = {
|
||||
[P in keyof O]: T;
|
||||
}
|
||||
interface Formatter<T> extends Readonly<Config<T>> {
|
||||
(rows: T[][]): string
|
||||
<O extends ValidValueType<O, T>>(objects: O[]): string
|
||||
configure(cfg: Partial<OmitPrint<Config<any>>>): Formatter<T>
|
||||
configure<T>(cfg: Partial<Config<T>>): Formatter<T>
|
||||
}
|
||||
function configure<T = any>(cfg: Partial<Config<T>>): Formatter<T>
|
||||
const maxTotalWidth: number
|
||||
const print: StringConstructor
|
||||
const title: StringConstructor
|
||||
const dash: '-'
|
||||
const right: false
|
||||
}
|
||||
|
||||
export = asTable
|
Loading…
Add table
Add a link
Reference in a new issue