devextreme-angular 21.1.3: dxDataGridColumn deprecated
cesco69 opened this issue · 3 comments
columns
property of dx-data-grid
has this type definition:
// \devextreme-angular\ui\data-grid\index.d.ts
export declare class DxDataGridComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
columns: Array<DevExpress.ui.dxDataGridColumn | string>;
}
but the dxDataGridColumn
is marked as deprecated:
// \devextreme\bundles\dx.all.d.ts
/**
* @deprecated
*/
export type dxDataGridColumn = DevExpress.ui.dxDataGrid.Column;
what is the correct type definition if I want set the correct type to a property into my component, eg.:
import { dxDataGridColumn } from 'devextreme/ui/data_grid';
public columnDefs: Array<dxDataGridColumn> = [];
<dx-data-grid [columns]="columnDefs"></dx-data-grid>
Hi @cesco69,
In v.21.1.3 we made our TypeScript definitions stricter and deprecated all internal types that we plan to remove in the future. Please refer to this BC for more information: DevExtreme TypeScript declarations become stricter.
We will add the information about new types to the deprecation message in the next releases so that you can migrate to the correct types. Currently, you can ignore this message.
@cesco69, we are currently reviewing existing type names and locations. To determine the most demanded types and process them first, we marked types under review as deprecated. dxDataGridColumn
is already on the list.
If you get more of these warnings, you can report them in the DevExpress/DevExtreme#17885 thread, and we'll provide public substitutions.
This is a very poor way of handling this issue. I have implemented a CustomStore and to upgrade to the latest version of DevExtreme, I have to beg you to provide a suitable replacement class to use for LoadOptions. Public APIs should always have been provided for these documented API elements. By all means have a private implementation type, but when you are documenting a public API you should be adhering to it.