From afaef96ff2ea8bec05af3671645e724f87875d06 Mon Sep 17 00:00:00 2001 From: alexlavrov <36633600+alexslavr@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:08:39 +0400 Subject: [PATCH 1/4] RepeatUnion helper --- packages/devextreme/js/common/charts.d.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/devextreme/js/common/charts.d.ts b/packages/devextreme/js/common/charts.d.ts index 8907a07b402e..d1db0ae5ac53 100644 --- a/packages/devextreme/js/common/charts.d.ts +++ b/packages/devextreme/js/common/charts.d.ts @@ -45,11 +45,30 @@ export type ChartsLabelOverlap = 'hide' | 'none' | 'stack'; */ export type ChartsDataType = 'datetime' | 'numeric' | 'string'; +type BuildTuple = Result['length'] extends Length + ? Result + : BuildTuple; + +type Tail = T extends [unknown, ...infer Rest] ? Rest : []; + +type RepeatUnionInternal< + T extends string, + DepthTuple extends unknown[], +> = DepthTuple['length'] extends 0 + ? never + : T | `${T}${RepeatUnionInternal>}`; + +type RepeatUnion< + T extends string, + Depth extends number, +> = RepeatUnionInternal>; + /** * @public * @namespace DevExpress.common.charts + * @type 'dash'|'dot'|'longDash'|'solid' */ -export type DashStyle = 'dash' | 'dot' | 'longDash' | 'solid'; +export type DashStyle = RepeatUnion<'dash' | 'dot' | 'longDash' | 'solid', 7>; /** * @public From 858baae0acf0eefe5a35ddad1a94095a8a345b9c Mon Sep 17 00:00:00 2001 From: Alex Lavrov <36633600+alexslavr@users.noreply.github.com> Date: Mon, 24 Aug 2026 16:09:19 +0400 Subject: [PATCH 2/4] Refacror --- packages/devextreme/js/common/charts.d.ts | 21 ++------------------- packages/devextreme/js/core/index.d.ts | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/packages/devextreme/js/common/charts.d.ts b/packages/devextreme/js/common/charts.d.ts index d1db0ae5ac53..84337108ec62 100644 --- a/packages/devextreme/js/common/charts.d.ts +++ b/packages/devextreme/js/common/charts.d.ts @@ -2,6 +2,7 @@ import { HorizontalAlignment } from '../common'; import { Format } from '../localization'; import { BaseLegendItem } from '../viz/common'; import { baseSeriesObject } from '../viz/chart'; +import { RepeatUnion } from '../core'; /** * @public @@ -45,30 +46,12 @@ export type ChartsLabelOverlap = 'hide' | 'none' | 'stack'; */ export type ChartsDataType = 'datetime' | 'numeric' | 'string'; -type BuildTuple = Result['length'] extends Length - ? Result - : BuildTuple; - -type Tail = T extends [unknown, ...infer Rest] ? Rest : []; - -type RepeatUnionInternal< - T extends string, - DepthTuple extends unknown[], -> = DepthTuple['length'] extends 0 - ? never - : T | `${T}${RepeatUnionInternal>}`; - -type RepeatUnion< - T extends string, - Depth extends number, -> = RepeatUnionInternal>; - /** * @public * @namespace DevExpress.common.charts * @type 'dash'|'dot'|'longDash'|'solid' */ -export type DashStyle = RepeatUnion<'dash' | 'dot' | 'longDash' | 'solid', 7>; +export type DashStyle = RepeatUnion<'dash' | 'dot' | 'longDash' | 'solid', 5>; /** * @public diff --git a/packages/devextreme/js/core/index.d.ts b/packages/devextreme/js/core/index.d.ts index 5429ef1d9346..32b32b24c389 100644 --- a/packages/devextreme/js/core/index.d.ts +++ b/packages/devextreme/js/core/index.d.ts @@ -63,6 +63,24 @@ export type AllPermutations = UnionLength extends PermutedU [K in T]: Permutations | AllPermutations> }[T] : string; +type BuildTuple = Result['length'] extends Length + ? Result + : BuildTuple; + +type Tail = T extends [unknown, ...infer Rest] ? Rest : []; + +type RepeatUnionInternal< + T extends string, + DepthTuple extends unknown[], +> = DepthTuple['length'] extends 0 + ? never + : T | `${T}${RepeatUnionInternal>}`; + +export type RepeatUnion< + T extends string, + Depth extends number, +> = RepeatUnionInternal>; + /// #DEBUG export type EventProps = Extract; From 51ecd5c556fcd31de471fa21b81afaaa96cc0ace Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov <5574159+mpreyskurantov@users.noreply.github.com> Date: Thu, 8 Oct 2026 18:12:26 +0300 Subject: [PATCH 3/4] DashStyle as RepeatUnion & uidRef for ts, keep as existing enum for aspnet --- packages/devextreme-metadata/aspnet/enums.ts | 3 ++ .../make-integration-metadata.ts | 11 +++++- packages/devextreme-vue/src/bar-gauge.ts | 6 +-- packages/devextreme-vue/src/bullet.ts | 2 +- packages/devextreme-vue/src/chart.ts | 36 ++++++++--------- packages/devextreme-vue/src/circular-gauge.ts | 2 +- packages/devextreme-vue/src/funnel.ts | 8 ++-- packages/devextreme-vue/src/linear-gauge.ts | 2 +- packages/devextreme-vue/src/pie-chart.ts | 8 ++-- packages/devextreme-vue/src/polar-chart.ts | 24 ++++++------ packages/devextreme-vue/src/range-selector.ts | 16 ++++---- packages/devextreme-vue/src/sankey.ts | 4 +- packages/devextreme-vue/src/sparkline.ts | 2 +- packages/devextreme-vue/src/tree-map.ts | 4 +- packages/devextreme-vue/src/vector-map.ts | 6 +-- packages/devextreme/js/common/charts.d.ts | 3 +- packages/devextreme/ts/dx.all.d.ts | 39 ++++++++++++++++++- 17 files changed, 113 insertions(+), 63 deletions(-) diff --git a/packages/devextreme-metadata/aspnet/enums.ts b/packages/devextreme-metadata/aspnet/enums.ts index 06c672dca88b..a13409973703 100644 --- a/packages/devextreme-metadata/aspnet/enums.ts +++ b/packages/devextreme-metadata/aspnet/enums.ts @@ -11,6 +11,9 @@ export const enums = { 'swing', ], }, + DashStyle: { + Items: ['dash', 'dot', 'longDash', 'solid'], + }, EdmType: { Items: ['Guid', 'Int32', 'Int64', 'String', 'Boolean', 'Single', 'Decimal'], }, diff --git a/packages/devextreme-metadata/make-integration-metadata.ts b/packages/devextreme-metadata/make-integration-metadata.ts index 8212aa40bd7b..729a4c81edef 100644 --- a/packages/devextreme-metadata/make-integration-metadata.ts +++ b/packages/devextreme-metadata/make-integration-metadata.ts @@ -1,5 +1,5 @@ import { Imd, addMetadata, replaceTypes, removeMembers } from 'devextreme-internal-tools/metadata'; -import { cleanArtifacts } from './common'; +import { cleanArtifacts, types } from './common'; import { IMD_FILE, PATHS } from './common/paths'; cleanArtifacts(IMD_FILE, 'IntegrationDataGenerator.cfg.json'); @@ -9,6 +9,15 @@ Imd.makeMetadata({ artifacts: PATHS.artifactsDir, }, mutations: [ + // Normalize all DashStyle references: MemberRef -> UidRef + replaceTypes(/\.dashStyle/, ['*'], [types.uidRef('common/charts:DashStyle')]), + // Restore explicit undefined where declared + replaceTypes( + /^(?:common\/charts:SeriesLabel\.border|viz\/chart:dxChartSeriesTypesCommonSeries(?:HoverStyle|SelectionStyle)?Border|viz\/(?:pie_chart|polar_chart):.+\.border)\.dashStyle$/, + ['*'], + [types.uidRef('common/charts:DashStyle'), 'undefined'], + ), + replaceTypes('common/grids:AIAssistant.chat', ['*'], ['object']), replaceTypes('common/grids:ColumnAIOptions.popup', ['*'], ['object']), replaceTypes('ui/card_view:dxCardViewOptions.filterBuilderPopup', ['*'], ['object']), diff --git a/packages/devextreme-vue/src/bar-gauge.ts b/packages/devextreme-vue/src/bar-gauge.ts index 52755604cf23..14035e18614e 100644 --- a/packages/devextreme-vue/src/bar-gauge.ts +++ b/packages/devextreme-vue/src/bar-gauge.ts @@ -299,7 +299,7 @@ const DxBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -556,7 +556,7 @@ const DxLegendBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -854,7 +854,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/bullet.ts b/packages/devextreme-vue/src/bullet.ts index 3a327972ee71..ad52d15b06d2 100644 --- a/packages/devextreme-vue/src/bullet.ts +++ b/packages/devextreme-vue/src/bullet.ts @@ -158,7 +158,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/chart.ts b/packages/devextreme-vue/src/chart.ts index 46fa1c0b3ef1..f9bf57235da1 100644 --- a/packages/devextreme-vue/src/chart.ts +++ b/packages/devextreme-vue/src/chart.ts @@ -575,7 +575,7 @@ const DxAnnotationBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -785,7 +785,7 @@ const DxAxisConstantLineStyleConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, paddingLeftRight: Number, paddingTopBottom: Number, @@ -947,7 +947,7 @@ const DxBorderConfig = { bottom: Boolean, color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, left: Boolean, opacity: Number, right: Boolean, @@ -1261,7 +1261,7 @@ const DxCommonAxisSettingsConstantLineStyleConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, paddingLeftRight: Number, paddingTopBottom: Number, @@ -1478,7 +1478,7 @@ const DxCommonSeriesSettingsConfig = { closeValueField: String, color: [Object, String] as PropType>, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, fullstackedarea: {}, fullstackedbar: {}, fullstackedline: {}, @@ -1563,7 +1563,7 @@ const DxCommonSeriesSettingsHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -1649,7 +1649,7 @@ const DxCommonSeriesSettingsSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -1705,7 +1705,7 @@ const DxConstantLineConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, displayBehindSeries: Boolean, extendAxis: Boolean, label: Object as PropType>, @@ -1769,7 +1769,7 @@ const DxConstantLineStyleConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, paddingLeftRight: Number, paddingTopBottom: Number, @@ -1802,7 +1802,7 @@ const DxCrosshairConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, enabled: Boolean, horizontalLine: [Boolean, Object] as PropType>, label: Object as PropType>, @@ -2023,7 +2023,7 @@ const DxHorizontalLineConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, opacity: Number, visible: Boolean, @@ -2085,7 +2085,7 @@ const DxHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -2583,7 +2583,7 @@ const DxPaneBorderConfig = { props: { bottom: Boolean, color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, left: Boolean, opacity: Number, right: Boolean, @@ -2801,7 +2801,7 @@ const DxSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -2878,7 +2878,7 @@ const DxSeriesConfig = { closeValueField: String, color: [Object, String] as PropType>, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, highValueField: String, hoverMode: String as PropType, hoverStyle: Object as PropType>, @@ -2944,7 +2944,7 @@ const DxSeriesBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } @@ -3326,7 +3326,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -3538,7 +3538,7 @@ const DxVerticalLineConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, opacity: Number, visible: Boolean, diff --git a/packages/devextreme-vue/src/circular-gauge.ts b/packages/devextreme-vue/src/circular-gauge.ts index 30a4952c726f..40e451e8f31d 100644 --- a/packages/devextreme-vue/src/circular-gauge.ts +++ b/packages/devextreme-vue/src/circular-gauge.ts @@ -238,7 +238,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/funnel.ts b/packages/devextreme-vue/src/funnel.ts index f5eef48848b0..a1b5f01f1b76 100644 --- a/packages/devextreme-vue/src/funnel.ts +++ b/packages/devextreme-vue/src/funnel.ts @@ -260,7 +260,7 @@ const DxBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -598,7 +598,7 @@ const DxLabelBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } @@ -691,7 +691,7 @@ const DxLegendBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -1013,7 +1013,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/linear-gauge.ts b/packages/devextreme-vue/src/linear-gauge.ts index 00de8e267341..ac6e961ab6e4 100644 --- a/packages/devextreme-vue/src/linear-gauge.ts +++ b/packages/devextreme-vue/src/linear-gauge.ts @@ -235,7 +235,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/pie-chart.ts b/packages/devextreme-vue/src/pie-chart.ts index 36fc0da7f5e4..5c36f2ec8605 100644 --- a/packages/devextreme-vue/src/pie-chart.ts +++ b/packages/devextreme-vue/src/pie-chart.ts @@ -415,7 +415,7 @@ const DxAnnotationBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -469,7 +469,7 @@ const DxBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -1204,7 +1204,7 @@ const DxSeriesBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } @@ -1440,7 +1440,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/polar-chart.ts b/packages/devextreme-vue/src/polar-chart.ts index cedd5e770e7b..509f756e93e4 100644 --- a/packages/devextreme-vue/src/polar-chart.ts +++ b/packages/devextreme-vue/src/polar-chart.ts @@ -461,7 +461,7 @@ const DxAnnotationBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -695,7 +695,7 @@ const DxBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -990,7 +990,7 @@ const DxCommonSeriesSettingsConfig = { border: Object as PropType>, closed: Boolean, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hoverMode: String as PropType, hoverStyle: Object as PropType>, ignoreEmptyPoints: Boolean, @@ -1048,7 +1048,7 @@ const DxCommonSeriesSettingsHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -1128,7 +1128,7 @@ const DxCommonSeriesSettingsSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -1182,7 +1182,7 @@ const DxConstantLineConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, displayBehindSeries: Boolean, extendAxis: Boolean, label: Object as PropType>, @@ -1236,7 +1236,7 @@ const DxConstantLineStyleConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, label: Object as PropType>, width: Number } @@ -1436,7 +1436,7 @@ const DxHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -2058,7 +2058,7 @@ const DxSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -2118,7 +2118,7 @@ const DxSeriesConfig = { border: Object as PropType>, closed: Boolean, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hoverMode: String as PropType, hoverStyle: Object as PropType>, ignoreEmptyPoints: Boolean, @@ -2173,7 +2173,7 @@ const DxSeriesBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } @@ -2535,7 +2535,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/range-selector.ts b/packages/devextreme-vue/src/range-selector.ts index 8f51f71406ad..664e13887dbd 100644 --- a/packages/devextreme-vue/src/range-selector.ts +++ b/packages/devextreme-vue/src/range-selector.ts @@ -386,7 +386,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } @@ -589,7 +589,7 @@ const DxCommonSeriesSettingsConfig = { closeValueField: String, color: [Object, String] as PropType>, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, fullstackedarea: {}, fullstackedbar: {}, fullstackedline: {}, @@ -674,7 +674,7 @@ const DxCommonSeriesSettingsHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -760,7 +760,7 @@ const DxCommonSeriesSettingsSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, width: Number @@ -959,7 +959,7 @@ const DxHoverStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -1636,7 +1636,7 @@ const DxSelectionStyleConfig = { props: { border: Object as PropType>, color: [Object, String] as PropType>, - dashStyle: String as PropType, + dashStyle: Object as PropType, hatching: Object as PropType>, highlight: Boolean, size: Number, @@ -1713,7 +1713,7 @@ const DxSeriesConfig = { closeValueField: String, color: [Object, String] as PropType>, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, highValueField: String, hoverMode: String as PropType, hoverStyle: Object as PropType>, @@ -1779,7 +1779,7 @@ const DxSeriesBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, visible: Boolean, width: Number } diff --git a/packages/devextreme-vue/src/sankey.ts b/packages/devextreme-vue/src/sankey.ts index c5369ffdce0e..cf0a7b69bbb5 100644 --- a/packages/devextreme-vue/src/sankey.ts +++ b/packages/devextreme-vue/src/sankey.ts @@ -236,7 +236,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -732,7 +732,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/sparkline.ts b/packages/devextreme-vue/src/sparkline.ts index f4613a9b41ee..abf4e0f7caf1 100644 --- a/packages/devextreme-vue/src/sparkline.ts +++ b/packages/devextreme-vue/src/sparkline.ts @@ -206,7 +206,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/tree-map.ts b/packages/devextreme-vue/src/tree-map.ts index 33b7cd35c042..134ae9bc17f0 100644 --- a/packages/devextreme-vue/src/tree-map.ts +++ b/packages/devextreme-vue/src/tree-map.ts @@ -228,7 +228,7 @@ const DxBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -768,7 +768,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme-vue/src/vector-map.ts b/packages/devextreme-vue/src/vector-map.ts index 3aa0539eba11..271f64c9d1e5 100644 --- a/packages/devextreme-vue/src/vector-map.ts +++ b/packages/devextreme-vue/src/vector-map.ts @@ -321,7 +321,7 @@ const DxAnnotationBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -367,7 +367,7 @@ const DxBorderConfig = { props: { color: String, cornerRadius: Number, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number @@ -1064,7 +1064,7 @@ const DxTooltipBorderConfig = { }, props: { color: String, - dashStyle: String as PropType, + dashStyle: Object as PropType, opacity: Number, visible: Boolean, width: Number diff --git a/packages/devextreme/js/common/charts.d.ts b/packages/devextreme/js/common/charts.d.ts index 84337108ec62..df4be6e39e92 100644 --- a/packages/devextreme/js/common/charts.d.ts +++ b/packages/devextreme/js/common/charts.d.ts @@ -47,9 +47,10 @@ export type ChartsLabelOverlap = 'hide' | 'none' | 'stack'; export type ChartsDataType = 'datetime' | 'numeric' | 'string'; /** + * @docid * @public + * @type object * @namespace DevExpress.common.charts - * @type 'dash'|'dot'|'longDash'|'solid' */ export type DashStyle = RepeatUnion<'dash' | 'dot' | 'longDash' | 'solid', 5>; diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 36d0fd1babca..0753d20c0761 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -2070,7 +2070,13 @@ declare module DevExpress.common.charts { }; export type ChartsDataType = 'datetime' | 'numeric' | 'string'; export type ChartsLabelOverlap = 'hide' | 'none' | 'stack'; - export type DashStyle = 'dash' | 'dot' | 'longDash' | 'solid'; + /** + * [descr:DashStyle] + */ + export type DashStyle = DevExpress.core.RepeatUnion< + 'dash' | 'dot' | 'longDash' | 'solid', + 5 + >; export type DiscreteAxisDivisionMode = 'betweenLabels' | 'crossLabels'; /** * [descr:Font] @@ -7189,6 +7195,15 @@ declare module DevExpress.common.grids { } } declare module DevExpress.core { + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + type BuildTuple< + Length extends number, + Result extends unknown[] = [] + > = Result['length'] extends Length + ? Result + : BuildTuple; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ @@ -7487,6 +7502,22 @@ declare module DevExpress.core { * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ interface PromiseType extends JQueryPromise {} + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + export type RepeatUnion< + T extends string, + Depth extends number + > = RepeatUnionInternal>; + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + type RepeatUnionInternal< + T extends string, + DepthTuple extends unknown[] + > = DepthTuple['length'] extends 0 + ? never + : T | `${T}${RepeatUnionInternal>}`; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ @@ -7505,6 +7536,12 @@ declare module DevExpress.core { | Array | null | undefined; + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + type Tail = T extends [unknown, ...infer Rest] + ? Rest + : []; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. From d381b5115547c4db9804e6f8f677c7a7fddc9c7d Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov <5574159+mpreyskurantov@users.noreply.github.com> Date: Sun, 11 Oct 2026 17:32:41 +0300 Subject: [PATCH 4/4] rename RepeatUnion to PermutationsWithRepetition, remove unused helpers --- packages/devextreme/js/common/charts.d.ts | 4 +- packages/devextreme/js/core/index.d.ts | 21 ++----- packages/devextreme/ts/dx.all.d.ts | 76 ++++++++++++++--------- 3 files changed, 54 insertions(+), 47 deletions(-) diff --git a/packages/devextreme/js/common/charts.d.ts b/packages/devextreme/js/common/charts.d.ts index df4be6e39e92..2c7b3068346f 100644 --- a/packages/devextreme/js/common/charts.d.ts +++ b/packages/devextreme/js/common/charts.d.ts @@ -1,8 +1,8 @@ import { HorizontalAlignment } from '../common'; +import { PermutationsWithRepetition } from '../core'; import { Format } from '../localization'; import { BaseLegendItem } from '../viz/common'; import { baseSeriesObject } from '../viz/chart'; -import { RepeatUnion } from '../core'; /** * @public @@ -52,7 +52,7 @@ export type ChartsDataType = 'datetime' | 'numeric' | 'string'; * @type object * @namespace DevExpress.common.charts */ -export type DashStyle = RepeatUnion<'dash' | 'dot' | 'longDash' | 'solid', 5>; +export type DashStyle = PermutationsWithRepetition<'dash' | 'dot' | 'longDash' | 'solid', 5>; /** * @public diff --git a/packages/devextreme/js/core/index.d.ts b/packages/devextreme/js/core/index.d.ts index 32b32b24c389..fbfa07c9af12 100644 --- a/packages/devextreme/js/core/index.d.ts +++ b/packages/devextreme/js/core/index.d.ts @@ -63,23 +63,10 @@ export type AllPermutations = UnionLength extends PermutedU [K in T]: Permutations | AllPermutations> }[T] : string; -type BuildTuple = Result['length'] extends Length - ? Result - : BuildTuple; - -type Tail = T extends [unknown, ...infer Rest] ? Rest : []; - -type RepeatUnionInternal< - T extends string, - DepthTuple extends unknown[], -> = DepthTuple['length'] extends 0 - ? never - : T | `${T}${RepeatUnionInternal>}`; - -export type RepeatUnion< - T extends string, - Depth extends number, -> = RepeatUnionInternal>; +export type PermutationsWithRepetition = PermutationsWithRepetitionInner; +type PermutationsWithRepetitionInner = K extends TMaxLength + ? T + : T | `${T}${PermutationsWithRepetitionInner}`; /// #DEBUG diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 0753d20c0761..2fae404c0176 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -2073,7 +2073,7 @@ declare module DevExpress.common.charts { /** * [descr:DashStyle] */ - export type DashStyle = DevExpress.core.RepeatUnion< + export type DashStyle = DevExpress.core.PermutationsWithRepetition< 'dash' | 'dot' | 'longDash' | 'solid', 5 >; @@ -7195,15 +7195,6 @@ declare module DevExpress.common.grids { } } declare module DevExpress.core { - /** - * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. - */ - type BuildTuple< - Length extends number, - Result extends unknown[] = [] - > = Result['length'] extends Length - ? Result - : BuildTuple; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ @@ -7476,6 +7467,34 @@ declare module DevExpress.core { render(options?: TemplateRenderOptions): DxElement; } + /** + * IncrementalCounter[1]=2, IncrementalCounter[2]=3, IncrementalCounter[3]=4, ... + */ + /** + * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. + */ + type IncrementalCounter = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ]; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ @@ -7497,27 +7516,34 @@ declare module DevExpress.core { /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - export interface PromiseType {} + export type PermutationsWithRepetition< + T extends string, + TMaxLength extends number + > = PermutationsWithRepetitionInner; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - interface PromiseType extends JQueryPromise {} + type PermutationsWithRepetitionInner< + T extends string, + TMaxLength extends number, + K extends number + > = K extends TMaxLength + ? T + : + | T + | `${T}${PermutationsWithRepetitionInner< + T, + TMaxLength, + IncrementalCounter[K] + >}`; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - export type RepeatUnion< - T extends string, - Depth extends number - > = RepeatUnionInternal>; + export interface PromiseType {} /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - type RepeatUnionInternal< - T extends string, - DepthTuple extends unknown[] - > = DepthTuple['length'] extends 0 - ? never - : T | `${T}${RepeatUnionInternal>}`; + interface PromiseType extends JQueryPromise {} /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ @@ -7536,12 +7562,6 @@ declare module DevExpress.core { | Array | null | undefined; - /** - * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. - */ - type Tail = T extends [unknown, ...infer Rest] - ? Rest - : []; /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.