From: Nicolas Coden Date: Wed, 16 May 2018 21:03:38 +0000 (+0200) Subject: fix: fix Typescript jQuery foundation method definition #11193 X-Git-Tag: v6.6.0~3^2~169^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e540b7b9;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: fix Typescript jQuery foundation method definition #11193 Foundation public methods does not all take a jQuery element as first parameter. They can actually take anything and the jQuery interface does not allow to know by the method definition to which plugin the method belong (and what are its arguments types). So the only solution seems to accept anything. See https://github.com/zurb/foundation-sites/pull/11199#discussion_r183766940 Closes https://github.com/zurb/foundation-sites/issues/11193 --- diff --git a/js/typescript/foundation.d.ts b/js/typescript/foundation.d.ts index a0e6e063b..67af00a22 100644 --- a/js/typescript/foundation.d.ts +++ b/js/typescript/foundation.d.ts @@ -486,7 +486,7 @@ declare module FoundationSites { } interface JQuery { - foundation(method?: string|Array, $element?: JQuery): JQuery; + foundation(method?: string | Array, ...args: any[]): JQuery; } declare var Foundation: FoundationSites.FoundationSitesStatic;