Closed florentsuc closed 2 months ago
I do have same issues, my TS version 4.9.4
Error: node_modules/@revolist/revogrid/dist/types/plugins/trimmed/trimmed.plugin.d.ts:9:75 - error TS2344: Type 'T' does not satisfy the constraint 'GDataType'.
Type 'T' is not assignable to type 'ColumnRegular'.
9 export declare const trimmedPlugin: <T>(store: Observable<DataSourceState<T, any>>) => PluginSubscribe<DataSourceState<T, any>>;
~
node_modules/@revolist/revogrid/dist/types/plugins/trimmed/trimmed.plugin.d.ts:9:38
9 export declare const trimmedPlugin: <T>(store: Observable<DataSourceState<T, any>>) => PluginSubscribe<DataSourceState<T, any>>;
~
This type parameter might need an `extends RevoGrid.ColumnRegular` constraint.
node_modules/@revolist/revogrid/dist/types/plugins/trimmed/trimmed.plugin.d.ts:9:38
9 export declare const trimmedPlugin: <T>(store: Observable<DataSourceState<T, any>>) => PluginSubscribe<DataSourceState<T, any>>;
~
This type parameter might need an `extends GDataType` constraint.
Error: node_modules/@revolist/revogrid/dist/types/plugins/trimmed/trimmed.plugin.d.ts:9:120 - error TS2344: Type 'T' does not satisfy the constraint 'GDataType'.
9 export declare const trimmedPlugin: <T>(store: Observable<DataSourceState<T, any>>) => PluginSubscribe<DataSourceState<T, any>>;
~
node_modules/@revolist/revogrid/dist/types/plugins/trimmed/trimmed.plugin.d.ts:9:38
9 export declare const trimmedPlugin: <T>(store: Observable<DataSourceState<T, any>>) => PluginSubscribe<DataSourceState<T, any>>;
~
This type parameter might need an `extends GDataType` constraint.
Error: node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:65:86 - error TS2344: Type 'T' does not satisfy the constraint 'GDataType'.
Type 'T' is not assignable to type 'ColumnRegular'.
65 export declare function setSourceByVirtualIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:65:49
65 export declare function setSourceByVirtualIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
This type parameter might need an `extends RevoGrid.ColumnRegular` constraint.
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:65:49
65 export declare function setSourceByVirtualIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
This type parameter might need an `extends GDataType` constraint.
Error: node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:71:87 - error TS2344: Type 'T' does not satisfy the constraint 'GDataType'.
Type 'T' is not assignable to type 'ColumnRegular'.
71 export declare function setSourceByPhysicalIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:71:50
71 export declare function setSourceByPhysicalIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
This type parameter might need an `extends RevoGrid.ColumnRegular` constraint.
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:71:50
71 export declare function setSourceByPhysicalIndex<T>(store: Observable<DataSourceState<T, any>>, modelByIndex: Record<number, T>): void;
~
This type parameter might need an `extends GDataType` constraint.
Error: node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:72:71 - error TS2344: Type 'T' does not satisfy the constraint 'GDataType'.
Type 'T' is not assignable to type 'ColumnRegular'.
72 export declare function setItems<T>(store: Observable<DataSourceState<T, any>>, items: number[]): void;
~
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:72:34
72 export declare function setItems<T>(store: Observable<DataSourceState<T, any>>, items: number[]): void;
~
This type parameter might need an `extends RevoGrid.ColumnRegular` constraint.
node_modules/@revolist/revogrid/dist/types/store/dataSource/data.store.d.ts:72:34
72 export declare function setItems<T>(store: Observable<DataSourceState<T, any>>, items: number[]): void;
~
This type parameter might need an `extends GDataType` constraint.
Fixed with "skipLibCheck": true
but that a bit weird.
Can not reproduce anymore on 4+
Starting from typescript 4.8.X, multiple typescript definition files are not compiling anymore.
You can reproduce the bug on the lib by updating typescript to 4.8.X.
The following files are not compiling anymore:
Error examples:
The problem is that typescript version dependency is prefixed by
^
inpackage.json
so if you runnpm update
it will update typescript to 4.9.X and raise the issue.Thank you :)
Edit: If anyone is facing the same issue, I disabled the errors by adding this in the tsconfig.json: