mwg API
    Preparing search index...

    Type Alias MwlTypedRow<Columns>

    MwlTypedRow: {
        [Column in Columns[number] as Column["name"]]?: MwlColumnValueType<
            Column["type"],
        >
    }

    A table's rows with each declared column's name and coerced value type.

    Every field is optional because an absent cell omits the key: MWL_TABLE validation reports the missing column, but contentCatalog still returns the row without it, so readers must not assume presence. Deriving from the declaration (rather than casting each access) is what turns a renamed column type or a removed column into a compile error at every use.

    Type Parameters

    import { typedRows } from '@datamoc/mwg/mwl';
    import type { MwlTableColumn } from '@datamoc/mwg/mwl';

    const columns = [
    { name: 'kind', type: 'string' },
    { name: 'cost', type: 'number' },
    ] as const satisfies readonly MwlTableColumn[];
    const rows = typedRows({ columns, rows: [{ kind: 'torch', cost: 3 }] });
    console.log(rows[0]?.cost); // 3