mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #17349 from Kovensky/patch-3
jquery: Make JQueryStatic's context optional
This commit is contained in:
Vendored
+1
-1
@@ -2470,7 +2470,7 @@ interface JQueryStatic<TElement extends Node = HTMLElement> {
|
||||
* @see {@link https://api.jquery.com/jQuery/}
|
||||
* @since 1.0
|
||||
*/
|
||||
(selector: JQuery.Selector, context: Element | Document | JQuery): JQuery<TElement>;
|
||||
(selector: JQuery.Selector, context: Element | Document | JQuery | undefined): JQuery<TElement>;
|
||||
// HACK: This is the factory function returned when importing jQuery without a DOM. Declaring it separately breaks using the type parameter on JQueryStatic.
|
||||
// HACK: The discriminator parameter handles the edge case of passing a Window object to JQueryStatic. It doesn't actually exist on the factory function.
|
||||
<FElement extends Node = HTMLElement>(window: Window, discriminator: boolean): JQueryStatic<FElement>;
|
||||
|
||||
Reference in New Issue
Block a user