diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index d9d5a5bdc6..2c7d5ce75a 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -2470,7 +2470,7 @@ interface JQueryStatic { * @see {@link https://api.jquery.com/jQuery/} * @since 1.0 */ - (selector: JQuery.Selector, context: Element | Document | JQuery): JQuery; + (selector: JQuery.Selector, context: Element | Document | JQuery | undefined): JQuery; // 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. (window: Window, discriminator: boolean): JQueryStatic;