/* tslint:disable */
/* eslint-disable */

/**
 * Full-text filter across all columns in the current result set.
 * Pass an empty `query` to clear the filter.
 * Returns the new total count.
 */
export function filter_rows(query: string): number;

/**
 * Generate N rows of fake data and store them in WASM memory.
 * Returns the total count created.
 */
export function generate_rows(count: number): number;

/**
 * Get a page of data as a JSON string.
 */
export function get_page(start: number, len: number): string;

/**
 * Get the current total (after sort/filter).
 */
export function get_total(): number;

/**
 * Sort the current result set by a column.
 * `col`: 0=name, 1=email, 2=age, 3=city, 4=salary, 5=department, 6=phone
 * Returns the new total count.
 */
export function sort_by_column(col: number, ascending: boolean): number;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
    readonly memory: WebAssembly.Memory;
    readonly filter_rows: (a: number, b: number) => number;
    readonly generate_rows: (a: number) => number;
    readonly get_page: (a: number, b: number) => [number, number];
    readonly get_total: () => number;
    readonly sort_by_column: (a: number, b: number) => number;
    readonly __wbindgen_externrefs: WebAssembly.Table;
    readonly __wbindgen_malloc: (a: number, b: number) => number;
    readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
    readonly __wbindgen_free: (a: number, b: number, c: number) => void;
    readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;

/**
 * Instantiates the given `module`, which can either be bytes or
 * a precompiled `WebAssembly.Module`.
 *
 * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
 *
 * @returns {InitOutput}
 */
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
 * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
 * for everything else, calls `WebAssembly.instantiate` directly.
 *
 * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
 *
 * @returns {Promise<InitOutput>}
 */
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
