From 5e540b7b9568874383ca551aa9e34d8c685ce007 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Wed, 16 May 2018 23:03:38 +0200 Subject: [PATCH] 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 --- js/typescript/foundation.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2