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

Add TypeScript type definition file for index.js and add a TS project example #71

Open
albincorreya opened this issue Oct 7, 2021 · 0 comments

Comments

@albincorreya
Copy link
Member

Currently, we distribute the TypeScript type definition (.d.ts) files separately for each module through our releases. Though devs can use these builds for using essentia.js on a TypeScript project like this example, adding an index.d.ts type definition file for index.js can make it easy for developers to integrate into a TS project as similar as in JS. This was mentioned in #46

It would be also nice to have a TypeScript project as an example in the repository for reference.

How?

  • Add index.d.ts file and specify it inside the package.json file
  • Update tsconfg.json with the respective settings
  • Publishing types along with the newest release of the package.
  • Add an example to the repository using this typescript entry point.
@albincorreya albincorreya changed the title Add TypeScript type definition file for index,js (npm main entrypoint) and add typescript project example Add TypeScript type definition file for index.js and add a TS project example Oct 7, 2021
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

1 participant