Skip to content

Commit 0015045

Browse files
authored
Fix #7785: Add NULL to getElement() TS def (#7787)
1 parent d49a061 commit 0015045

File tree

82 files changed

+262
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+262
-260
lines changed

components/lib/accordion/accordion.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export interface AccordionProps extends Omit<React.DetailedHTMLProps<React.HTMLA
336336
export declare class Accordion extends React.Component<AccordionProps, any> {
337337
/**
338338
* Used to get container element.
339-
* @return {HTMLDivElement} Container element
339+
* @return {HTMLDivElement | null} Container element
340340
*/
341-
public getElement(): HTMLDivElement;
341+
public getElement(): HTMLDivElement | null;
342342
}

components/lib/autocomplete/autocomplete.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -588,22 +588,22 @@ export declare class AutoComplete extends React.Component<AutoCompleteProps, any
588588
public search(event: React.SyntheticEvent, query: string, source?: 'dropdown' | 'input' | null | undefined): void;
589589
/**
590590
* Used to get container element.
591-
* @return {HTMLSpanElement} Container element
591+
* @return {HTMLSpanElement | null} Container element
592592
*/
593-
public getElement(): HTMLSpanElement;
593+
public getElement(): HTMLSpanElement | null;
594594
/**
595595
* Used to get input element.
596-
* @return {InputText} Input element
596+
* @return {InputText | null} Input element
597597
*/
598-
public getInput(): typeof InputText;
598+
public getInput(): typeof InputText | null;
599599
/**
600600
* Used to get overlay element.
601-
* @return {HTMLElement} Overlay element
601+
* @return {HTMLElement | null} Overlay element
602602
*/
603-
public getOverlay(): HTMLElement;
603+
public getOverlay(): HTMLElement | null;
604604
/**
605605
* Used to get the options of inline virtualScroller component.
606-
* @return {VirtualScroller} VirtualScroller component
606+
* @return {VirtualScroller | null} VirtualScroller component
607607
*/
608-
public getVirtualScroller(): VirtualScroller;
608+
public getVirtualScroller(): VirtualScroller | null;
609609
}

components/lib/avatar/avatar.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export interface AvatarProps extends Omit<React.DetailedHTMLProps<React.HTMLAttr
152152
export declare class Avatar extends React.Component<AvatarProps, any> {
153153
/**
154154
* Used to get container element.
155-
* @return {HTMLDivElement} Container element
155+
* @return {HTMLDivElement | null} Container element
156156
*/
157-
public getElement(): HTMLDivElement;
157+
public getElement(): HTMLDivElement | null;
158158
}

components/lib/avatargroup/avatargroup.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export interface AvatarGroupProps extends Omit<React.DetailedHTMLProps<React.HTM
7676
export declare class AvatarGroup extends React.Component<AvatarGroupProps, any> {
7777
/**
7878
* Used to get container element.
79-
* @return {HTMLDivElement} Container element
79+
* @return {HTMLDivElement | null} Container element
8080
*/
81-
public getElement(): HTMLDivElement;
81+
public getElement(): HTMLDivElement | null;
8282
}

components/lib/badge/badge.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export interface BadgeProps extends Omit<React.DetailedHTMLProps<React.HTMLAttri
9393
export declare class Badge extends React.Component<BadgeProps, any> {
9494
/**
9595
* Used to get container element.
96-
* @return {HTMLSpanElement} Container element
96+
* @return {HTMLSpanElement | null} Container element
9797
*/
98-
public getElement(): HTMLSpanElement;
98+
public getElement(): HTMLSpanElement | null;
9999
}

components/lib/blockui/blockui.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export declare class BlockUI extends React.Component<BlockUIProps, any> {
136136
public unblock(): void;
137137
/**
138138
* Used to get container element.
139-
* @return {HTMLDivElement} Container element
139+
* @return {HTMLDivElement | null} Container element
140140
*/
141-
public getElement(): HTMLDivElement;
141+
public getElement(): HTMLDivElement | null;
142142
}

components/lib/breadcrumb/breadcrumb.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export interface BreadCrumbProps extends Omit<React.DetailedHTMLProps<React.HTML
118118
export declare class BreadCrumb extends React.Component<BreadCrumbProps, any> {
119119
/**
120120
* Used to get container element.
121-
* @return {HTMLElement} Container element
121+
* @return {HTMLElement | null} Container element
122122
*/
123-
public getElement(): HTMLElement;
123+
public getElement(): HTMLElement | null;
124124
}

components/lib/calendar/calendar.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1026,19 +1026,19 @@ export declare class Calendar<TMode extends CalendarSelectionMode = 'single', TV
10261026
public getViewDate(): TValue;
10271027
/**
10281028
* Used to get container element.
1029-
* @return {HTMLSpanElement} Container element
1029+
* @return {HTMLSpanElement | null} Container element
10301030
*/
1031-
public getElement(): HTMLSpanElement;
1031+
public getElement(): HTMLSpanElement | null;
10321032
/**
10331033
* Used to get input element.
1034-
* @return {HTMLInputElement} Input element
1034+
* @return {HTMLInputElement | null} Input element
10351035
*/
1036-
public getInput(): HTMLInputElement;
1036+
public getInput(): HTMLInputElement | null;
10371037
/**
10381038
* Used to get overlay element.
1039-
* @return {HTMLElement} Overlay element
1039+
* @return {HTMLElement | null} Overlay element
10401040
*/
1041-
public getOverlay(): HTMLElement;
1041+
public getOverlay(): HTMLElement | null;
10421042
/**
10431043
* Used to update the current view date.
10441044
* @param {React.SyntheticEvent | null} event - Browser event.

components/lib/carousel/carousel.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export declare class Carousel extends React.Component<CarouselProps, any> {
306306
public stopAutoplay(): void;
307307
/**
308308
* Used to get container element.
309-
* @return {HTMLDivElement} Container element
309+
* @return {HTMLDivElement | null} Container element
310310
*/
311-
public getElement(): HTMLDivElement;
311+
public getElement(): HTMLDivElement | null;
312312
}

components/lib/cascadeselect/cascadeselect.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -347,22 +347,22 @@ export declare class CascadeSelect extends React.Component<CascadeSelectProps, a
347347
public focus(): void;
348348
/**
349349
* Used to get container element.
350-
* @return {HTMLDivElement} Container element
350+
* @return {HTMLDivElement | null} Container element
351351
*/
352-
public getElement(): HTMLDivElement;
352+
public getElement(): HTMLDivElement | null;
353353
/**
354354
* Used to get input element.
355-
* @return {HTMLInputElement} Input element
355+
* @return {HTMLInputElement | null} Input element
356356
*/
357-
public getInput(): HTMLInputElement;
357+
public getInput(): HTMLInputElement | null;
358358
/**
359359
* Used to get overlay element.
360-
* @return {HTMLElement} Overlay element
360+
* @return {HTMLElement | null} Overlay element
361361
*/
362-
public getOverlay(): HTMLElement;
362+
public getOverlay(): HTMLElement | null;
363363
/**
364364
* Used to get label element.
365-
* @return {HTMLSpanElement} Label element
365+
* @return {HTMLSpanElement | null} Label element
366366
*/
367-
public getLabel(): HTMLSpanElement;
367+
public getLabel(): HTMLSpanElement | null;
368368
}

components/lib/chart/chart.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export declare class Chart extends React.Component<ChartProps, any> {
135135
public refresh(): void;
136136
/**
137137
* Used to get container element.
138-
* @return {HTMLDivElement} Container element
138+
* @return {HTMLDivElement | null} Container element
139139
*/
140-
public getElement(): HTMLDivElement;
140+
public getElement(): HTMLDivElement | null;
141141
}

components/lib/checkbox/checkbox.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ export declare class Checkbox extends React.Component<CheckboxProps, any> {
250250
public focus(): void;
251251
/**
252252
* Used to get container element.
253-
* @return {HTMLDivElement} Container element
253+
* @return {HTMLDivElement | null} Container element
254254
*/
255-
public getElement(): HTMLDivElement;
255+
public getElement(): HTMLDivElement | null;
256256
/**
257257
* Used to get input element.
258-
* @return {HTMLInputElement} Input element
258+
* @return {HTMLInputElement | null} Input element
259259
*/
260-
public getInput(): HTMLInputElement;
260+
public getInput(): HTMLInputElement | null;
261261
}

components/lib/chip/chip.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ export interface ChipProps extends Omit<React.DetailedHTMLProps<React.HTMLAttrib
161161
export declare class Chip extends React.Component<ChipProps, any> {
162162
/**
163163
* Used to get container element.
164-
* @return {HTMLDivElement} Container element
164+
* @return {HTMLDivElement | null} Container element
165165
*/
166-
public getElement(): HTMLDivElement;
166+
public getElement(): HTMLDivElement | null;
167167
/**
168168
* Used to set the visibility of the chip.
169169
* @param {boolean} visible - Whether to show or hide the chip

components/lib/chips/chips.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ export declare class Chips extends React.Component<ChipsProps, any> {
309309
public focus(): void;
310310
/**
311311
* Used to get container element.
312-
* @return {HTMLDivElement} Container element
312+
* @return {HTMLDivElement | null} Container element
313313
*/
314-
public getElement(): HTMLDivElement;
314+
public getElement(): HTMLDivElement | null;
315315
/**
316316
* Used to get input element.
317317
* @return {HTMLInputElement} Input element

components/lib/colorpicker/colorpicker.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,17 @@ export declare class ColorPicker extends React.Component<ColorPickerProps, any>
274274
public focus(): void;
275275
/**
276276
* Used to get container element.
277-
* @return {HTMLDivElement} Container element
277+
* @return {HTMLDivElement | null} Container element
278278
*/
279-
public getElement(): HTMLDivElement;
279+
public getElement(): HTMLDivElement | null;
280280
/**
281281
* Used to get input element.
282-
* @return {HTMLInputElement} Input element
282+
* @return {HTMLInputElement | null} Input element
283283
*/
284-
public getInput(): HTMLInputElement;
284+
public getInput(): HTMLInputElement | null;
285285
/**
286286
* Used to get overlay element.
287-
* @return {HTMLElement} Overlay element
287+
* @return {HTMLElement | null} Overlay element
288288
*/
289-
public getOverlay(): HTMLElement;
289+
public getOverlay(): HTMLElement | null;
290290
}

components/lib/contextmenu/contextmenu.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export declare class ContextMenu extends React.Component<ContextMenuProps, any>
229229
public hide(event: React.SyntheticEvent): void;
230230
/**
231231
* Used to get container element.
232-
* @return {HTMLDivElement} Container element
232+
* @return {HTMLDivElement | null} Container element
233233
*/
234-
public getElement(): HTMLDivElement;
234+
public getElement(): HTMLDivElement | null;
235235
}

components/lib/datascroller/datascroller.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export declare class DataScroller extends React.Component<DataScrollerProps, any
176176
public load(): void;
177177
/**
178178
* Used to get container element.
179-
* @return {HTMLDivElement} Container element
179+
* @return {HTMLDivElement | null} Container element
180180
*/
181-
public getElement(): HTMLDivElement;
181+
public getElement(): HTMLDivElement | null;
182182
}

components/lib/datatable/datatable.d.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -1918,16 +1918,17 @@ export declare class DataTable<TValue extends DataTableValueArray> extends React
19181918
public setSortMeta(sorts: DataTableSortMeta[]): void;
19191919
/**
19201920
* Used to get container element.
1921-
* @return {HTMLDivElement} Container element
1921+
* @return {HTMLDivElement | null} Container element
19221922
*/
1923-
public getElement(): HTMLDivElement;
1923+
public getElement(): HTMLDivElement | null;
19241924
/**
19251925
* Used to get container element.
1926-
* @return {HTMLDivElement} Container element
1926+
* @return {HTMLTableElement | null} Container element
19271927
*/
1928-
public getTable(): HTMLTableElement;
1928+
public getTable(): HTMLTableElement | null;
19291929
/**
19301930
* Used to get the virtual scroller.
1931+
* @return {VirtualScroller | null} Virtual scroller instance
19311932
*/
1932-
public getVirtualScroller(): VirtualScroller;
1933+
public getVirtualScroller(): VirtualScroller | null;
19331934
}

components/lib/dataview/dataview.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export interface DataViewProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
382382
export declare class DataView extends React.Component<DataViewProps, any> {
383383
/**
384384
* Used to get container element.
385-
* @return {HTMLDivElement} Container element
385+
* @return {HTMLDivElement | null} Container element
386386
*/
387-
public getElement(): HTMLDivElement;
387+
public getElement(): HTMLDivElement | null;
388388
}

components/lib/deferredcontent/deferredcontent.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export interface DeferredContentProps extends Omit<React.DetailedHTMLProps<React
9090
export declare class DeferredContent extends React.Component<DeferredContentProps, any> {
9191
/**
9292
* Used to get container element.
93-
* @return {HTMLDivElement} Container element
93+
* @return {HTMLDivElement | null} Container element
9494
*/
95-
public getElement(): HTMLDivElement;
95+
public getElement(): HTMLDivElement | null;
9696
}

components/lib/dialog/dialog.d.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -452,32 +452,32 @@ export declare class Dialog extends React.Component<DialogProps, any> {
452452
public resetPosition(): void;
453453
/**
454454
* Used to get the container element of the dialog.
455-
* @return {HTMLDivElement} Container element
455+
* @return {HTMLDivElement | null} Container element
456456
*/
457-
public getElement(): HTMLDivElement;
457+
public getElement(): HTMLDivElement | null;
458458
/**
459459
* Used to get mask element.
460-
* @return {HTMLDivElement} Mask element
460+
* @return {HTMLDivElement | null} Mask element
461461
*/
462-
public getMask(): HTMLDivElement;
462+
public getMask(): HTMLDivElement | null;
463463
/**
464464
* Used to get the content element of the dialog
465-
* @return {HTMLDivElement} Content element
465+
* @return {HTMLDivElement | null} Content element
466466
*/
467-
public getContent(): HTMLDivElement;
467+
public getContent(): HTMLDivElement | null;
468468
/**
469469
* Used to get the header element of the dialog
470-
* @return {HTMLDivElement} Header element
470+
* @return {HTMLDivElement | null} Header element
471471
*/
472-
public getHeader(): HTMLDivElement;
472+
public getHeader(): HTMLDivElement | null;
473473
/**
474474
* Used to get the dialog's footer element.
475-
* @return {HTMLDivElement} Footer element
475+
* @return {HTMLDivElement | null} Footer element
476476
*/
477-
public getFooter(): HTMLDivElement;
477+
public getFooter(): HTMLDivElement | null;
478478
/**
479479
* Used to get close button element.
480-
* @return {HTMLButtonElement} CloseButton element
480+
* @return {HTMLButtonElement | null} CloseButton element
481481
*/
482-
public getCloseButton(): HTMLButtonElement;
482+
public getCloseButton(): HTMLButtonElement | null;
483483
}

components/lib/divider/divider.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export interface DividerProps extends Omit<React.DetailedHTMLProps<React.HTMLAtt
9696
export declare class Divider extends React.Component<DividerProps, any> {
9797
/**
9898
* Used to get container element.
99-
* @return {HTMLDivElement} Container element
99+
* @return {HTMLDivElement | null} Container element
100100
*/
101-
public getElement(): HTMLDivElement;
101+
public getElement(): HTMLDivElement | null;
102102
}

components/lib/dock/dock.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export interface DockProps extends Omit<React.DetailedHTMLProps<React.HTMLAttrib
188188
export declare class Dock extends React.Component<DockProps, any> {
189189
/**
190190
* Used to get container element.
191-
* @return {HTMLDivElement} Container element
191+
* @return {HTMLDivElement | null} Container element
192192
*/
193-
public getElement(): HTMLDivElement;
193+
public getElement(): HTMLDivElement | null;
194194
}

components/lib/dropdown/dropdown.d.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -613,27 +613,27 @@ export declare class Dropdown extends React.Component<DropdownProps, any> {
613613
public hide(): void;
614614
/**
615615
* Used to get container element.
616-
* @return {HTMLDivElement} Container element
616+
* @return {HTMLDivElement | null} Container element
617617
*/
618-
public getElement(): HTMLDivElement;
618+
public getElement(): HTMLDivElement | null;
619619
/**
620620
* Used to get input element.
621-
* @return {HTMLInputElement} Input element
621+
* @return {HTMLInputElement | null} Input element
622622
*/
623-
public getInput(): HTMLInputElement;
623+
public getInput(): HTMLInputElement | null;
624624
/**
625625
* Used to get focusable input element.
626-
* @return {HTMLInputElement} Input element
626+
* @return {HTMLInputElement | null} Input element
627627
*/
628-
public getFocusInput(): HTMLInputElement;
628+
public getFocusInput(): HTMLInputElement | null;
629629
/**
630630
* Used to get overlay element.
631-
* @return {HTMLElement} Overlay element
631+
* @return {HTMLElement | null} Overlay element
632632
*/
633-
public getOverlay(): HTMLElement;
633+
public getOverlay(): HTMLElement | null;
634634
/**
635635
* Used to get the options of inline virtualScroller component.
636-
* @return {VirtualScroller} VirtualScroller component
636+
* @return {VirtualScroller | null} VirtualScroller component
637637
*/
638-
public getVirtualScroller(): VirtualScroller;
638+
public getVirtualScroller(): VirtualScroller | null;
639639
}

0 commit comments

Comments
 (0)