File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -795,13 +795,13 @@ module Emit =
795
795
let EmitQuerySelectorOverloads ( m : Browser.Method ) =
796
796
if matchSingleParamMethodSignature m " querySelector" " Element" " string" then
797
797
Pt.Printl " querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;"
798
- Pt.Printl " querySelector(selectors: string): Element | null;"
798
+ Pt.Printl " querySelector<E extends Element = Element> (selectors: string): E | null;"
799
799
800
800
/// Emit overloads for the querySelectorAll method
801
801
let EmitQuerySelectorAllOverloads ( m : Browser.Method ) =
802
802
if matchSingleParamMethodSignature m " querySelectorAll" " NodeList" " string" then
803
803
Pt.Printl " querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];"
804
- Pt.Printl " querySelectorAll(selectors: string): NodeListOf<Element >;"
804
+ Pt.Printl " querySelectorAll<E extends Element = Element> (selectors: string): NodeListOf<E >;"
805
805
806
806
let EmitHTMLElementTagNameMap () =
807
807
Pt.Printl " interface HTMLElementTagNameMap {"
Original file line number Diff line number Diff line change @@ -13746,9 +13746,9 @@ interface NavigatorUserMedia {
13746
13746
13747
13747
interface NodeSelector {
13748
13748
querySelector<K extends keyof ElementTagNameMap>(selectors: K): ElementTagNameMap[K] | null;
13749
- querySelector(selectors: string): Element | null;
13749
+ querySelector<E extends Element = Element> (selectors: string): E | null;
13750
13750
querySelectorAll<K extends keyof ElementListTagNameMap>(selectors: K): ElementListTagNameMap[K];
13751
- querySelectorAll(selectors: string): NodeListOf<Element >;
13751
+ querySelectorAll<E extends Element = Element> (selectors: string): NodeListOf<E >;
13752
13752
}
13753
13753
13754
13754
interface RandomSource {
You can’t perform that action at this time.
0 commit comments