Typechecking overwritten ColumnMeta
I have extended the
See: https://codesandbox.io/s/react-table-v8-forked-j74p00?file=/src/columns.tsx
In this codesandbox, I have overwritten the types in
When creating a column, I would expect
a)
b)
But TypeScript does not throw an error about either of these issues.
Is there a way to get TS to typecheck meta like this when creating columnDefs?
ColumnMeta type as described in https://tanstack.com/table/v8/docs/api/core/column-def#meta, which seems to give me correct autocompletion and typechecking when using column defs, but not when creating them.See: https://codesandbox.io/s/react-table-v8-forked-j74p00?file=/src/columns.tsx
In this codesandbox, I have overwritten the types in
extend-table-core.ts, and am creating a column definition using columnHelper in columns.tsx.When creating a column, I would expect
meta: { foo: "bar" } to error because:a)
foo is not part of the type that i'm using to overwrite ColumnMeta, andb)
meta is missing multiple non-optional properties from my overwriting typeBut TypeScript does not throw an error about either of these issues.
Is there a way to get TS to typecheck meta like this when creating columnDefs?