Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix Typescript jQuery foundation method definition #11193 #11274

Conversation

ncoden
Copy link
Contributor

@ncoden ncoden commented May 16, 2018

Description

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.

Changes

References

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to change)

Checklist (all required):

  • I have read and follow the CONTRIBUTING document.
  • There are no other pull request similar to this one.
  • The pull request title is descriptive.
  • The template is fully and correctly filled.
  • The pull request targets the right branch (develop or support/*).
  • My commits are correctly titled and contain all relevant information.
  • My code follows the code style of this project.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).
  • All new and existing tests passed.

⚠️ Require:

Dist folder is reserved for generated distribution files.

Changes:
* Copy `dist/foundation.d.s` to `js/typescript`
* Move `js/typescript/foundation.d.ts` to `dist` in the gulp `deploy:dist` task


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 foundation#11199 (comment)
Closes foundation#11193
@ncoden ncoden merged commit eaabca4 into foundation:develop May 24, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Jun 16, 2018
…n-global-definition-11193 for v6.5.0

cac478c chore: move typescript definitions out of dist folders
5e540b7 fix: fix Typescript jQuery foundation method definition foundation#11193

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with TypeScript definitions for selectTab
2 participants