JSDoc @default / type mismatch — Components Area#34287
Open
dmlvr wants to merge 100 commits into
Open
Conversation
Widen onValueChanged, validationError, validationErrors and value to include | null, matching the null stored in Editor._getDefaultOptions(). Widen _getValidationErrors() return type to unknown[] | null | undefined since it directly returns the now-nullable validationErrors option. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Widen value to include | null, matching the null stored in DataExpressionMixin._dataExpressionDefaultOptions(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d.ts Widen buttons to | undefined (runtime stores void 0) and onChange, onCopy, onCut, onEnterKey, onFocusIn, onFocusOut, onInput, onKeyDown, onKeyUp, onPaste to | null (runtime stores null), matching TextEditorBase._getDefaultOptions(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…et.base.d.ts Widen keyExpr, onItemClick, onItemContextMenu, onItemHold, onItemRendered, onSelectionChanging, onSelectionChanged and selectedItem to include | null, matching the null stored in CollectionWidget._getDefaultOptions() (collection_widget.base.ts / collection_widget.edit.ts). Widen List.scrollToItem() parameter type to accept | null: isDefined() already treats null and undefined identically at runtime, so this only corrects the signature to match the now-nullable selectedItem consumer in select_box.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Widen searchExpr to include | null: the mixin has no own default, but consumers (list.edit.search.ts, drop_down_list.ts) store null. Follow-on fixes required to keep check-types clean: - data_adapter.ts: widen DataAdapterOptions.searchExpr to | null since tree_view.search.ts passes the now-nullable option straight through; verified safe (data_adapter.ts consumes it via a nullish coalescing fallback and passes it as an opaque filter value). - list.edit.search.ts: remove the ts-expect-error over searchExpr: null, now unused after widening. - list.base.ts: add an explicit cast at the single affected call site in _getSpecificDataSourceOption() to work around a TS overload resolution fragility in component.d.ts option() (see Known Issues in progres_report.md for the full root-cause writeup). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…_editor.d.ts Verified against js/__internal/ui/drop_down_editor/drop_down_editor.ts _getDefaultOptions(): - buttons stores void 0 -> add | undefined - onClosed, onOpened, value store null -> add | null Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…_list.d.ts Verified against js/__internal/ui/drop_down_editor/drop_down_list.ts _getDefaultOptions() (onValueChanged inherited from editor.ts): - onSelectionChanged, onValueChanged, searchExpr, selectedItem store null -> add | null - onItemClick stores noop (a function) at this level, not null; the type is already correct (a function), so corrected the inaccurate @default null tag instead of widening the type (doc-only change, no behavior impact) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/select_box.ts _getDefaultOptions(): fieldTemplate stores null -> add | null. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/color_box/color_box.ts _getDefaultOptions(): fieldTemplate stores null -> add | null. Removed the now-unused @ts-expect-error directly above fieldTemplate: null in color_box.ts, made stale by the widened type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fieldTemplate is inherited from js/__internal/ui/drop_down_editor/drop_down_editor.ts _getDefaultOptions(), which stores null -> add | null. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/lookup.ts _getDefaultOptions() (fieldTemplate inherited from drop_down_editor.ts, onValueChanged inherited from editor.ts): fieldTemplate, onPageLoading, onPullRefresh, onScroll, onValueChanged all store null -> add | null. Removed the 3 now-unused @ts-expect-error directives above onScroll/onPullRefresh/onPageLoading in lookup.ts, made stale by the widened types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/tag_box.ts _getDefaultOptions() (onSelectionChanged inherited from collection_widget.base.ts): onMultiTagPreparing, onSelectAllValueChanged, onSelectionChanged all store null -> add | null. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/text_box/text_box.ts _getDefaultOptions(): maxLength stores null -> add | null. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/number_box/m_number_box.base.ts _getDefaultOptions(): buttons stores void 0 -> add | undefined. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/date_box/date_box.base.ts _getDefaultOptions() (maxLength inherited from text_box.ts): - disabledDates, maxLength, displayFormat store null -> add | null - value?: DateLike is a known linter blind spot (DateLike already includes null; the linter does not resolve type aliases) -> left untouched, no edit needed Follow-on fixes required to keep check-types clean: - Removed 2 now-unused @ts-expect-error above displayFormat/ disabledDates in date_box.base.ts, made stale by the widened types. - Widened Strategy.getDisplayFormat's displayFormat param to accept | null across all 6 date_box strategy implementations (base, calendar, calendar_with_time, date_view, list, native); all bodies already treat null/undefined identically via `||` fallback, so this is a safe, behavior-preserving signature widening (same pattern as the earlier List.scrollToItem() fix). - Fixed a separate, unrelated latent bug exposed by the above: added the missing `useHiddenSubmitElement?: boolean;` field to DateBoxBaseProperties (already present on the internal DropDownEditorProperties type it structurally extends), resolving an excess-property-check error on the _getDefaultOptions() object literal that TypeScript had not previously surfaced. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verified against js/__internal/ui/calendar/calendar.ts _getDefaultOptions(): disabledDates stores null -> add | null. value?: DateLike | DateLike[] is a known linter blind spot (DateLike already includes null; the linter does not resolve type aliases) -> left untouched, no edit needed. Follow-on fix: widened the same-named disabledDates field on BaseViewProperties in calendar.base_view.ts (which also stores null in its own _getDefaultOptions()) to keep the object literal built in calendar.ts:_viewConfig() assignable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
value had a concrete @default false but the type included a spurious | undefined (R2: a concrete @default must not include | undefined). Verified against js/__internal/ui/check_box/check_box.tsx (defaultCheckBoxProps.defaultValue: false, used whenever value is untouched) that the real stored/resolved default is the concrete false, never undefined -> removed | undefined, kept | null (used for the indeterminate three-state case). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 12 event handler options in js/ui/list.d.ts: onGroupRendered, onItemClick, onItemContextMenu, onItemDeleted, onItemDeleting, onItemHold, onItemReordered, onItemSwipe, onPageLoading, onPullRefresh, onScroll, onSelectAllValueChanged. Verified runtime defaults are null in list.base.ts, list.edit.ts and collection_widget.base.ts/collection_widget.edit.ts (already fixed in a prior batch). Widened each type with `| null` and removed the now-stale @ts-expect-error suppressions in list.base.ts and list.edit.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 9 event handler options in js/ui/tree_view.d.ts: onItemClick, onItemCollapsed, onItemContextMenu, onItemExpanded, onItemHold, onItemRendered, onItemSelectionChanged, onSelectAllValueChanged, onSelectionChanged. Verified runtime defaults are null in tree_view.base.ts (onItemSelectionChanged, onItemExpanded, onItemCollapsed, onSelectAllValueChanged), collection_widget.base.ts (onItemClick, onItemContextMenu, onItemHold, onItemRendered — already widened in a prior batch), and collection_widget.edit.ts (onSelectionChanged). Widened each type with `| null`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 4 event handler options in js/ui/menu.d.ts: onSubmenuHidden, onSubmenuHiding, onSubmenuShowing, onSubmenuShown. Verified runtime defaults are null in js/__internal/ui/menu/menu.ts _getDefaultOptions(). Widened each type with `| null` and removed the now-stale @ts-expect-error suppressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 5 event handler options in js/ui/context_menu.d.ts: onHidden, onHiding, onPositioning, onShowing, onShown. Verified runtime defaults are null in js/__internal/ui/context_menu/context_menu.ts _getDefaultOptions(). Widened each type with `| null`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warning for onItemTitleClick in js/ui/accordion.d.ts. Verified runtime default is null in js/__internal/ui/accordion.ts _getDefaultOptions(). Widened the type with `| null` and removed the now-stale @ts-expect-error suppression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 3 event handler options in js/ui/tab_panel.d.ts: onTitleClick, onTitleHold, onTitleRendered. Verified runtime defaults are null in js/__internal/ui/tab_panel/tab_panel.ts _getDefaultOptions(). Widened each type with `| null` and removed the now-stale @ts-expect-error suppressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warning for onClick in js/ui/button.d.ts.
Verified runtime: js/__internal/ui/button/button.tsx's defaultButtonProps
has no onClick entry, so the ComponentWrapper-merged _getDefaultOptions()
never sets onClick, meaning .option('onClick') stays undefined until
explicitly assigned (same "no explicit null in _getDefaultOptions ->
undefined" case as the buttons field in ui.drop_down_editor.d.ts, per the
convention doc). The previous `@default null` was inaccurate; corrected
to `@default undefined` and widened the type with `| undefined`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 2 event handler options in js/ui/button_group.d.ts: onItemClick, onSelectionChanged. Verified runtime defaults are null in js/__internal/ui/button_group.ts _getDefaultOptions(). Widened each type with `| null` and removed the now-stale @ts-expect-error suppressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings in js/ui/action_sheet.d.ts: - onCancelClick (widget-level option): verified runtime default is null in js/__internal/ui/action_sheet.ts _getDefaultOptions(); widened the type with `| null` and removed the now-stale @ts-expect-error suppression. - onClick (dxActionSheetItem property, Category B per the optional-fields typing convention): this is a per-item data field with no widget-level default (used only as a point-of-use fallback in the item template, not stored via _getDefaultOptions), so `.option()` never returns it. Removed the inaccurate `@default null` tag; the type is left unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warning for onContentReady in js/ui/speed_dial_action.d.ts. Verified runtime default is null in js/__internal/ui/speed_dial_action/m_speed_dial_action.ts _getDefaultOptions(). Widening only the local override initially broke the WidgetProperties<any> constraint check in m_speed_dial_action.ts (`class SpeedDialAction extends Widget<Properties>`), because dxSpeedDialActionOptions.onContentReady overrides the base WidgetOptions.onContentReady (js/ui/widget/ui.widget.d.ts), which itself had the exact same pre-existing jsdoc-default-matches-type warning (`@default null` but no `| null` in the type) and a confirmed `null` runtime default in js/__internal/core/widget/widget.ts _getDefaultOptions(). Per user decision, widened the shared base WidgetOptions.onContentReady with `| null` as well, which is the root cause fix and keeps the override compatible. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixed jsdoc-default-matches-type warnings for 4 event handler options in js/ui/popup.d.ts: onResize, onResizeEnd, onResizeStart, onTitleRendered. Verified runtime defaults are null in js/__internal/ui/popup/popup.ts _getDefaultOptions(). Widened each type with `| null` and removed a now-stale @ts-expect-error in js/__internal/ui/lookup.ts (its popup options literal sets onTitleRendered: null directly). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Widens the types of maxSize and minSize options to number | null in js/ui/drawer.d.ts to match their verified runtime default value of null in js/__internal/ui/drawer/drawer.ts. Also removes now-stale @ts-expect-error suppressions in drawer.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…undefined Corrects JSDoc @default from null to undefined and widens types to | undefined for onResize, onResizeEnd, onResizeStart, onItemExpanded, and onItemCollapsed in js/ui/splitter.d.ts to match their verified runtime default value of undefined in js/__internal/ui/splitter/splitter.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nTaskInserting, onTaskInserted, onTaskDeleting, onTaskDeleted, onTaskUpdating, onTaskUpdated, onTaskMoving, onTaskEditDialogShowing, onResourceManagerDialogShowing, onDependencyInserting, onDependencyInserted, onDependencyDeleting, onDependencyDeleted, onResourceInserting, onResourceInserted, onResourceDeleting, onResourceDeleted, onResourceAssigning, onResourceAssigned, onResourceUnassigning, onResourceUnassigned, onTaskClick, onTaskDblClick
…ng, onItemHold, onItemReordered, onItemSwipe, onPageLoading, onPullRefresh, onScroll, onSelectAllValueChanged
marker-dao
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.