DevExtreme jQuery/JS - Syntax Elements

Conditional Types

When navigating through DevExtreme sources, you can find conditional types like the following:

Code
  • export type DxEvent<TNativeEvent = Event> = {} extends EventType ? (EventObject & TNativeEvent) : EventType;
  •  
  • export type DxElement<T extends Element = HTMLElement> = {} extends Condition ? T : ElementWrapper<T>;

These conditional types enable integration with third-party libraries. You can ignore them.

They resolve to JQuery types: JQuery<HTMLElement> and JQueryEventObject with a cancel field.