Skip to content

Commit

Permalink
Fixes, remove @ts-expect-error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Bulychev committed May 7, 2024
1 parent db940c5 commit f98c10a
Show file tree
Hide file tree
Showing 28 changed files with 93 additions and 63 deletions.
1 change: 1 addition & 0 deletions apps/demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"gulp-minify": "3.1.0",
"gulp-replace": "1.1.4",
"jest": "26.6.3",
"jest-environment-node": "26.6.2",
"lodash.partial": "4.2.1",
"looks-same": "7.3.0",
"minimist": "1.2.8",
Expand Down
3 changes: 2 additions & 1 deletion packages/devextreme-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"devextreme": "~24.1.1"
},
"devDependencies": {
"@webcomponents/custom-elements": "^1.6.0",
"@angular/animations": "^16.2.10",
"@angular/cli": "^16.2.10",
"@angular/common": "^16.2.10",
Expand All @@ -37,6 +36,7 @@
"@angular/platform-server": "^16.2.12",
"@types/jasmine": "2.8.23",
"@types/node": "~20.11.0",
"@webcomponents/custom-elements": "^1.6.0",
"codelyzer": "6.0.2",
"core-js": "^2.6.12",
"del": "^2.2.2",
Expand All @@ -53,6 +53,7 @@
"karma-webpack": "^5.0.0",
"ng-packagr": "16.2.0",
"puppeteer": "^19.11.1",
"reflect-metadata": "0.1.13",
"rxjs": "^6.6.7",
"stream-browserify": "^3.0.0",
"tslib": "^2.6.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/devextreme-monorepo-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "devextreme-monorepo-tools",
"version": "24.1.1"
"version": "24.1.1",
"devDependencies": {
"ts-jest": "26.5.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class AllDayPanelCell extends BaseInfernoComponent<DateTableCellBaseProps
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<DateTableCellBase
className={`${ALL_DAY_PANEL_CELL_CLASS} ${className}`}
startDate={startDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ export class AllDayTable extends InfernoWrapperComponent<AllDayPanelTableProps>
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<Table
className="dx-scheduler-all-day-table"
height={allDayPanelData ? undefined : DefaultSizes.allDayPanelHeight}
width={width}
tableRef={tableRef}
>
{/* @ts-expect-error TS2786 */}
<AllDayPanelTableBody
viewData={allDayPanelData ?? AllDayPanelTableBodyDefaultProps.viewData}
leftVirtualCellWidth={viewData.leftVirtualCellWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export class AllDayPanelTableBody extends BaseInfernoComponent<AllDayPanelTableB
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<Row
leftVirtualCellWidth={leftVirtualCellWidth}
rightVirtualCellWidth={rightVirtualCellWidth}
Expand All @@ -67,7 +66,6 @@ export class AllDayPanelTableBody extends BaseInfernoComponent<AllDayPanelTableB
key,
startDate,
}) => (
// @ts-expect-error TS2786
<AllDayPanelCell
key={key}
isFirstGroupCell={!isVerticalGroupOrientation && isFirstGroupCell}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class DateHeader extends BaseInfernoComponent<DateHeaderProps> {
<>
{
dataMap.map((dateHeaderRow, rowIndex) => (
// @ts-expect-error TS2786
<Row
key={rowIndex.toString()}
className="dx-scheduler-header-row"
Expand All @@ -75,7 +74,6 @@ export class DateHeader extends BaseInfernoComponent<DateHeaderProps> {
text,
today,
}) => (
// @ts-expect-error TS2786
<DateHeaderCell
key={key}
startDate={startDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export class DateHeaderCell extends BaseInfernoComponent<DateHeaderCellProps> {
</>
)
: (
// @ts-expect-error TS2786
<DateHeaderText
splitText={splitText}
text={text}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class DateTable extends InfernoWrapperComponent<DateTableProps> {
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<Table
{...restProps}
tableRef={tableRef}
Expand All @@ -62,7 +61,6 @@ export class DateTable extends InfernoWrapperComponent<DateTableProps> {
className={classes}
width={width}
>
{/* @ts-expect-error TS2786 */}
<DateTableBody
cellTemplate={CellTemplateComponent}
viewData={viewData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class DateTableBody extends BaseInfernoComponent<DateTableBodyProps> {
}) => (
<Fragment key={fragmentKey}>
{
// @ts-expect-error TS2786
isGroupedAllDayPanel && <AllDayPanelTableBody
viewData={allDayPanel ?? AllDayPanelTableBodyDefaultProps.viewData}
dataCellTemplate={DataCellTemplateComponent}
Expand All @@ -66,7 +65,6 @@ export class DateTableBody extends BaseInfernoComponent<DateTableBodyProps> {
cells,
key: rowKey,
}) => (
// @ts-expect-error TS2786
<Row
key={rowKey}
className={rowClasses}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export class DateTableCellBase extends BaseInfernoComponent<DateTableCellBasePro
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<CellBase
isFirstGroupCell={isFirstGroupCell}
isLastGroupCell={isLastGroupCell}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class GroupPanel extends InfernoWrapperComponent<GroupPanelProps> {
const Layout = isVerticalLayout ? GroupPanelVertical : GroupPanelHorizontal;

return (
// @ts-expect-error TS2786
<Layout
height={height}
resourceCellTemplate={ResourceCellTemplateComponent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export class GroupPanelHorizontal extends BaseInfernoComponent<GroupPanelBasePro
return (
<>
{
// @ts-expect-error TS2786
groupPanelItems.map((group) => <GroupPanelHorizontalRow
key={group[0].key}
groupItems={group}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class GroupPanelHorizontalRow extends BaseInfernoComponent<GroupPanelRowP
isLastGroupCell,
key,
text,
// @ts-expect-error TS2786
}, index) => <GroupPanelHorizontalCell
key={key}
text={text}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class GroupPanelVertical extends BaseInfernoComponent<GroupPanelProps> {
<div className="dx-scheduler-group-flex-container">
{
groupPanelData.groupPanelItems
// @ts-expect-error TS2786
.map((group) => <GroupPanelVerticalRow
key={group[0].key}
groupItems={group}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class GroupPanelVerticalRow extends BaseInfernoComponent<GroupPanelRowPro
id,
key,
text,
// @ts-expect-error TS2786
}, index) => <GroupPanelVerticalCell
key={key}
text={text}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export class HeaderPanel extends InfernoWrapperComponent<HeaderPanelProps> {
<thead>
{
isHorizontalGrouping && !groupByDate && (
// @ts-expect-error TS2786
<GroupPanel
groupPanelData={groupPanelData}
groups={groups}
Expand All @@ -76,7 +75,6 @@ export class HeaderPanel extends InfernoWrapperComponent<HeaderPanelProps> {
}
{
groupByDate && (
// @ts-expect-error TS2786
<GroupPanel
groupPanelData={groupPanelData}
groups={groups}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export class Row extends BaseInfernoComponent<RowProps> {
hasLeftVirtualCell
&& leftVirtualCellCount != null
&& splitNumber(leftVirtualCellCount, MAX_COL_SPAN).map(
// @ts-expect-error TS2786
(colSpan, index) => <VirtualCell
className={`left-virtual-cell-${index}`}
width={leftVirtualCellWidth * (colSpan / leftVirtualCellCount)}
Expand All @@ -61,7 +60,6 @@ export class Row extends BaseInfernoComponent<RowProps> {
hasRightVirtualCell
&& rightVirtualCellCount != null
&& splitNumber(rightVirtualCellCount, MAX_COL_SPAN).map(
// @ts-expect-error TS2786
(colSpan, index) => <VirtualCell
className={`right-virtual-cell-${index}`}
width={rightVirtualCellWidth * (colSpan / rightVirtualCellCount)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export class Table extends BaseInfernoComponent<TableProps> {
<tbody>
{
hasTopVirtualRow && (
// @ts-expect-error TS2786
<VirtualRow
height={topVirtualRowHeight}
cellsCount={virtualCellsCount ?? VirtualRowDefaultProps.cellsCount}
Expand All @@ -82,7 +81,6 @@ export class Table extends BaseInfernoComponent<TableProps> {
{children}
{
hasBottomVirtualRow && (
// @ts-expect-error TS2786
<VirtualRow
height={bottomVirtualRowHeight}
cellsCount={virtualCellsCount ?? VirtualRowDefaultProps.cellsCount}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class TimePanelCell extends BaseInfernoComponent<TimePanelCellProps> {
const TimeCellTemplateComponent = getTemplate(timeCellTemplate);

return (
// @ts-expect-error TS2786
<CellBase
className={`dx-scheduler-time-panel-cell dx-scheduler-cell-sizes-vertical ${highlighted ? 'dx-scheduler-time-panel-current-time-cell' : ''} ${className}`}
isFirstGroupCell={isFirstGroupCell}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class TimePanelTable extends InfernoWrapperComponent<TimePanelTableProps>
const TimeCellTemplateComponent = getTemplate(timeCellTemplate);

return (
// @ts-expect-error TS2786
<Table
{...restProps}
className="dx-scheduler-time-panel"
Expand All @@ -67,19 +66,16 @@ export class TimePanelTable extends InfernoWrapperComponent<TimePanelTableProps>
<Fragment key={fragmentKey}>
{
isGroupedAllDayPanel && (
// @ts-expect-error TS2786
<Row
leftVirtualCellWidth={RowDefaultProps.leftVirtualCellWidth}
rightVirtualCellWidth={RowDefaultProps.rightVirtualCellWidth}
>
{/* @ts-expect-error TS2786 */}
<CellBase
className="dx-scheduler-time-panel-title-cell"
startDate={CellBaseDefaultProps.startDate}
endDate={CellBaseDefaultProps.endDate}
index={CellBaseDefaultProps.index}
>
{/* @ts-expect-error TS2786 */}
<AllDayPanelTitle/>
</CellBase>
</Row>
Expand All @@ -96,14 +92,12 @@ export class TimePanelTable extends InfernoWrapperComponent<TimePanelTableProps>
startDate,
text,
}) => (
// @ts-expect-error TS2786
<Row
key={key}
className="dx-scheduler-time-panel-row"
leftVirtualCellWidth={RowDefaultProps.leftVirtualCellWidth}
rightVirtualCellWidth={RowDefaultProps.rightVirtualCellWidth}
>
{/* @ts-expect-error TS2786 */}
<TimePanelCell
startDate={startDate}
endDate={CellBaseDefaultProps.endDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class VirtualCell extends BaseInfernoComponent<VirtualCellProps> {
const Cell = isHeaderCell ? HeaderCell : OrdinaryCell;

return (
// @ts-expect-error TS2786
<Cell
className="dx-scheduler-virtual-cell"
styles={modifiedStyles}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class VirtualRow extends BaseInfernoComponent<VirtualRowProps> {
const virtualCells = this.getVirtualCells();

return (
// @ts-expect-error TS2786
<Row
className={classes}
styles={modifiedStyles}
Expand All @@ -70,7 +69,6 @@ export class VirtualRow extends BaseInfernoComponent<VirtualRowProps> {
{
virtualCells.map(
(_, index) => (
// @ts-expect-error TS2786
<VirtualCell
key={index.toString()}
width={VirtualCellDefaultProps.width}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class DateTableMonth extends InfernoWrapperComponent<DateTableProps> {
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<DateTable
{...restProps}
viewData={viewData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class DateTableMonthCell extends BaseInfernoComponent<DateTableCellBasePr
const DataCellTemplateComponent = getTemplate(dataCellTemplate);

return (
// @ts-expect-error TS2786
<DateTableCellBase
className={classes}
dataCellTemplate={DataCellTemplateComponent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class TimelineDateHeaderLayout extends BaseInfernoComponent<DateHeaderPro
}

return (
// @ts-expect-error TS2786
<Row
key={rowIndex.toString()}
className="dx-scheduler-header-row"
Expand All @@ -86,7 +85,6 @@ export class TimelineDateHeaderLayout extends BaseInfernoComponent<DateHeaderPro
text,
today,
}) => (
// @ts-expect-error TS2786
<DateHeaderCell
key={key}
startDate={startDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class HeaderPanelTimeline extends InfernoWrapperComponent<HeaderPanelProp
const TimeCellTemplateComponent = getTemplate(timeCellTemplate);

return (
// @ts-expect-error TS2786
<HeaderPanel
dateHeaderData={dateHeaderData}
groupPanelData={groupPanelData}
Expand Down

0 comments on commit f98c10a

Please sign in to comment.