<script lang="ts" module>
  import {
    type TableOptions,
    type Table,
    createTable,
    type ColumnDef,
  } from '@tanstack/table-core';

  export type DataTableProps<TData, TValue> = {
    data: TData[];
    columns: ColumnDef<TData, TValue>[];
  };

  export function createTableInstance<TData, TValue>(
    options: TableOptions<TData>
  ): Table<TData> {
    return createTable(options);
  }
</script>