UNPKG

@humanspeak/svelte-headless-table

Version:

A powerful, headless table library for Svelte that provides complete control over table UI while handling complex data operations like sorting, filtering, pagination, grouping, and row expansion. Build custom, accessible data tables with zero styling opin

28 lines (27 loc) 901 B
import type { Matrix } from '../types/Matrix.js'; /** * Creates a matrix of the specified dimensions filled with null values. * * @param width - The number of columns in the matrix. * @param height - The number of rows in the matrix. * @returns A new matrix with all elements set to null. * @example * ```typescript * getNullMatrix(3, 2) * // Returns [[null, null, null], [null, null, null]] * ``` */ export declare const getNullMatrix: (width: number, height: number) => Matrix<null>; /** * Transposes a matrix, swapping rows and columns. * * @template T - The type of elements in the matrix. * @param matrix - The matrix to transpose. * @returns A new matrix with rows and columns swapped. * @example * ```typescript * getTransposed([[1, 2, 3], [4, 5, 6]]) * // Returns [[1, 4], [2, 5], [3, 6]] * ``` */ export declare const getTransposed: <T>(matrix: Matrix<T>) => Matrix<T>;