Skip to content

Commit fd0fbad

Browse files
Update overridingTypes.json (#878)
Fix setSelectionRange types as `null` is a valid argument and comes from selectionStart and selectionEnd types
1 parent 469ba81 commit fd0fbad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

baselines/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7350,7 +7350,7 @@ interface HTMLInputElement extends HTMLElement {
73507350
* @param end The offset into the text field for the end of the selection.
73517351
* @param direction The direction in which the selection is performed.
73527352
*/
7353-
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
7353+
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
73547354
/**
73557355
* Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
73567356
* @param n Value to decrement the value by.
@@ -8856,7 +8856,7 @@ interface HTMLTextAreaElement extends HTMLElement {
88568856
* @param end The offset into the text field for the end of the selection.
88578857
* @param direction The direction in which the selection is performed.
88588858
*/
8859-
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
8859+
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
88608860
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
88618861
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
88628862
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

inputfiles/overridingTypes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@
12801280
"setSelectionRange": {
12811281
"name": "setSelectionRange",
12821282
"override-signatures": [
1283-
"setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void"
1283+
"setSelectionRange(start: number | null, end: number | null, direction?: \"forward\" | \"backward\" | \"none\"): void"
12841284
]
12851285
}
12861286
}
@@ -1467,7 +1467,7 @@
14671467
"setSelectionRange": {
14681468
"name": "setSelectionRange",
14691469
"override-signatures": [
1470-
"setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void"
1470+
"setSelectionRange(start: number | null, end: number | null, direction?: \"forward\" | \"backward\" | \"none\"): void"
14711471
]
14721472
}
14731473
}

0 commit comments

Comments
 (0)