Type Alias: RenamedTableField<T>
RenamedTableField<
T> =object
Defined in: lib/markdown.ts:280
A renamed table field. A field with a label and a key of the object supplied to the table function.
Example
const items = [{name: 'Alice', age: 30}, {name: 'Bob', age: 40}];
console.log(table(items, [{label: 'Name', field: 'name'}, {label: 'Age', field: 'age'}]));
// Prints:
//
// | Name | Age |
// | ---- | --- |
// | Alice | 30 |
// | Bob | 40 |
Type Parameters
T
T
The type of the objects in the array in the table.
Properties
field
field: keyof
T
Defined in: lib/markdown.ts:282
label
label:
string
Defined in: lib/markdown.ts:281