Given:
table = headlessTable<Row>(this, {
columns: () => this.args.columns, // this.args.columns: ColumnConfig<Row>[]
data: () => this.args.data, // this.args.data: Row[]
plugins: [
RowSelection.with(() => {
return {
selection: [],
onSelect: (data) => { // Parameter 'data' implicitly has an 'any' type.
...
},
onDeselect: () => {},
};
}),
],
});
I would hope that the first data argument of onSelect hook would give me correct type on the first argument (data) and not any. Or what would be the correct TS usage?
I can obviously just do:
onSelect: (data: T) => { ... }
but that feels ... unnecessary?
Given:
I would hope that the first
dataargument ofonSelecthook would give me correct type on the first argument (data) and notany. Or what would be the correct TS usage?I can obviously just do:
but that feels ... unnecessary?