You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Core(utils): type 6 m_ files ahead of the rename, part 2 - #35504
NonNullable<T> makes a nullable source look unconditional in the return type. For example, const source: { value: string } | undefined = ...; const merged = extend({}, source) now types merged.value as string, although at runtime the undefined source is skipped and value is absent. Please preserve nullish uncertainty (for example, model the non-null branch as Partial<NonNullable<T>> when T also contains an EmptySource) so callers cannot access properties that may not exist.
The merged result is modeled as an intersection, but extend overwrites earlier properties. For example, extend({ value: 1 }, { value: 'x' }).value is inferred as number & string (never), although the runtime value is a string. This will make ordinary overriding merges incorrectly unusable; accumulate sources with overwrite semantics (for example, omit keys supplied by the next non-skipped source before adding that source), while preserving the optional-source behavior.
FilterBuilder types moved to types.ts: the internal operations keep a nullable
filter expression and the value-text customizeText; the items get their id on
creation. Sortable passes the element type to getPublicElement.
…replaces
- DOMComponent, Widget, DiagramFloatingPanel: the default options are a spread;
the undefined entries were skipped by extend and are dropped
- grids: a hasCellValueCalculator guard instead of ProcessedColumn casts,
an explicit index check in adaptivity
- SpeedDial: the action options are a partial patch, onClick can be null
- satisfies DataType[], parseFloat(String(width))
…pointment date reads
- findBestMatches is generic by the filter and the item, no cast of the item
- Form: the runtime info returns the widget union, getEditor and getButton narrow it
by instanceof (getButton is typed by the Button wrapper it returns)
- Scheduler: the date field of the form and of the data accessor is read in one place
OptionAction<THandler> derives the arguments of an action from the handler of its
option without the EventInfo fields that the action adds itself; the panel events
are EventInfo<panel> plus their own fields. The visibility actions no longer pass
the component, the action sets it.
getEditor narrowed the widget instance by `instanceof Editor`, but dxCheckBox is
an r1 wrapper (ComponentWrapper), not a subclass of the internal Editor, so
getEditor returned undefined for a check box. Editor.isEditor is the guard that
the check box wrapper extends for this case.
…p-merged arrays
- a union source is applied member by member: a target property that only one
member overrides is no longer typed by the target alone
- the kept target properties are picked by key remapping instead of Omit, so the
known properties of a target with an index signature keep their types
- a deep merge of two arrays is typed by the items of both arrays, as in the
shallow merge
- a nested source value that can be undefined keeps the target value in the type,
and a nested target value that can be missing gives a copy of the source value
… a generic source
`extend({}, source, ...patches)` and `extend(true, {}, source, ...patches)` copy the
source into a new object, so the result has the type of the source when the patches
only hold its own properties. The conditional result type of the general overloads
stays unresolved for a generic source, which needed casts and a directive at the
callers: options_controller_base, component.mock and the clone of an export cell
(its empty cell is typed as a patch of the prepared item).
…ads type
devices, mergeColumns, the grid state storing and the html editor form dialog copy
an object into `{}`, so extend gives the type of the copied object without a cast.
- allowGrouping of the common column settings is `'auto'` again when
groupPanel.visible is 'auto' (the Boolean() wrapper changed the value that
columnOption returns); ColumnCommonSettings types it as boolean | 'auto'
- the lookup and the validator read calculateCellValue without a guard again,
createColumn initializes it, as _updateColumnOptions already states
- the reset of the expand columns is a typed Partial<Column>, so only the null
minWidth needs a directive instead of the whole map callback
…e handler
The options of the header filter TreeView are a typed Pick of its properties,
so the directive covers only onOptionChanged, whose handler takes the internal
TreeView while the option declares the public one.
…f guarding its nodes
A removed node is null only inside _removeNode and _markChildren, which splice
it out before they return, so the stored structure, getData, getFullData and
search hold nodes only. The marking goes through a nullable view of the same
array, and the `if (!node)` guards that the typed each() had added are gone.
… literal
- the config is Partial: the workspace defaults fill what a view does not set
(agendaDuration, the scrolling mode)
- startDate is DateLike, the startDate of a view reaches the workspace as is
- the resources option of the workspace holds the resource configs, not loaders
(the workspace never reads it)
- the remaining mismatch has a directive on its own line: the workspace types
the selected cells of onSelectedCellsClick as object
…g literal
A directive on a property of the literal also hid the scrolling mismatch that
comes from the spread view options: TypeScript reports only the failing literal
property then. The handler gets its own typed declaration with the directive, and
the resolved scrolling (the same object as the view scrolling) is passed
explicitly, so the rest of the literal is checked again. The scrolling mode is
not filled by the partial type, as the previous commit message said.
…nd getButton
Narrowing the found widget (instanceof Editor, then Editor.isEditor) changed the
public methods: getEditor('<button item name>') and getEditor('<tabbed item
name>') returned undefined instead of the Button and the TabPanel the runtime info
stores for those items. Both methods return the stored widget as before; their
internal type is the FormWidgetInstance union, the public d.ts is unchanged.
The Jest test pins the check box, the button and the tab panel lookups.
…itions
formatObjectConverter takes a Format and a DataType and returns the format, the
precision and the currency typed by Format and FormatObject. The precision is read
from any format as before; a string or a function format has none, so that read
keeps a directive.
…e typed hubs
The rebase onto main brought the typed m_columns_view (DevExpress#35510); its code meets the
typed extend and each:
- _afterRowPrepared takes the ActionEvent of the row prepared action
- the local ScrollableOptions of this PR gives way to the one of the views types;
the copied useNative: 'auto' of the grid scrolling keeps a directive, it is
normalized right below
- _renderRows reads the columns that _renderTable sets on its options
- the header filter of a group panel column reads its groupIndex
- the cells of a fixed table row are HTML elements
getBoundingRect is protected again in the views: main reaches it through View.
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
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.