Skip to content

Commit

Permalink
Update overridingTypes.json (#878)
Browse files Browse the repository at this point in the history
Fix setSelectionRange types as `null` is a valid argument and comes from selectionStart and selectionEnd types
  • Loading branch information
lifeiscontent authored Oct 6, 2020
1 parent 469ba81 commit fd0fbad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7350,7 +7350,7 @@ interface HTMLInputElement extends HTMLElement {
* @param end The offset into the text field for the end of the selection.
* @param direction The direction in which the selection is performed.
*/
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
/**
* 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.
* @param n Value to decrement the value by.
Expand Down Expand Up @@ -8856,7 +8856,7 @@ interface HTMLTextAreaElement extends HTMLElement {
* @param end The offset into the text field for the end of the selection.
* @param direction The direction in which the selection is performed.
*/
setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down
4 changes: 2 additions & 2 deletions inputfiles/overridingTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@
"setSelectionRange": {
"name": "setSelectionRange",
"override-signatures": [
"setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void"
"setSelectionRange(start: number | null, end: number | null, direction?: \"forward\" | \"backward\" | \"none\"): void"
]
}
}
Expand Down Expand Up @@ -1467,7 +1467,7 @@
"setSelectionRange": {
"name": "setSelectionRange",
"override-signatures": [
"setSelectionRange(start: number, end: number, direction?: \"forward\" | \"backward\" | \"none\"): void"
"setSelectionRange(start: number | null, end: number | null, direction?: \"forward\" | \"backward\" | \"none\"): void"
]
}
}
Expand Down

0 comments on commit fd0fbad

Please sign in to comment.