Skip to content

Update TypeScript definitions for V1 API #239

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

Closed
mattrcarter opened this issue Apr 26, 2017 · 3 comments
Closed

Update TypeScript definitions for V1 API #239

mattrcarter opened this issue Apr 26, 2017 · 3 comments

Comments

@mattrcarter
Copy link

mattrcarter commented Apr 26, 2017

The latest TypeScript definitions available on https://github.com/DefinitelyTyped/DefinitelyTyped are for popper.js v0.4.x. Would you be willing to update the definitions to reflect the breaking changes in the v1 API?

Steps to reproduce the problem

  1. Install popper.js latest version (v1.8.4 at time of this issue)
  2. Install latest TypeScript definitions from https://github.com/DefinitelyTyped/DefinitelyTyped (for v0.4.x at time of this issue)
  3. Add a custom modifier as described here: Popper.js v1 API migration instructions #62

What is the expected behavior?

Custom modifiers would be definable.

What went wrong?

The wrong types for modifiers in the TS definitions prevent compilation of TypeScript code.

Any other comments?

If you'd like help updating the definitions let me know and I'll see what I can do to help out.

@FezVrasta
Copy link
Member

I never used TypeScript. The whole API is described in the documentation. I use JSDoc to describe the types so maybe there's a tool to automatically generate them from jsdoc?

@FezVrasta
Copy link
Member

I tried https://www.npmjs.com/package/tsd-jsdoc but it throws a lot of warnings because of invalid types like Object Array, HTMLElement, Boolean, String...

@FezVrasta
Copy link
Member

I'm going to close this since there's already a PR to update the definitions in the DefinitelyTyped repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants