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
}
interface JQuery {
- foundation(method?: string|Array<any>, $element?: JQuery): JQuery;
+ foundation(method?: string | Array<any>, ...args: any[]): JQuery;
}
declare var Foundation: FoundationSites.FoundationSitesStatic;