Skip to content

TypeScript declarations #135

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
TiagoCavalcante opened this issue Apr 23, 2022 · 8 comments
Closed

TypeScript declarations #135

TiagoCavalcante opened this issue Apr 23, 2022 · 8 comments

Comments

@TiagoCavalcante
Copy link

I think that TypeScript declarations are very important for any npm library, with TS 4.6 it can be done mostly automatically.

You can follow the rollup.config.js and tsconfig.json of this repo to generate the .d.ts files.

@hansagames
Copy link

Hi, @TiagoCavalcante
could you please make PR with changes needed ?

@CodyJasonBennett
Copy link
Contributor

That rollup config assumes the project is written in TypeScript.

@TiagoCavalcante
Copy link
Author

@CodyJasonBennett my plan was to change all extensions to ts and fix the errors, but if you prefer I can add JSDoc. Out of the file declarations are error prone.

So what do you prefer?

1 similar comment
@TiagoCavalcante
Copy link
Author

@CodyJasonBennett my plan was to change all extensions to ts and fix the errors, but if you prefer I can add JSDoc. Out of the file declarations are error prone.

So what do you prefer?

@CodyJasonBennett
Copy link
Contributor

I'd have to defer this to #24 where this was already discussed.

@TiagoCavalcante
Copy link
Author

I didn't read that before, I'll only do it when you are sure if you want TS, I don't want to work on a rejected PR.

@gordonnl
Copy link
Contributor

There are currently at least one TS fork of the library #24 (comment)
I would recommend offering your support there. I'll add a link to the fork in the readme for other TS users. Thanks!

@pschroen
Copy link
Contributor

I think the OP is more about the declarations rather than the code itself being written in TypeScript?

Here's the thread on what three.js has done for comparison:
https://discourse.threejs.org/t/with-r126-typescript-type-declaration-files-are-located-at-definitelytyped/23157

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

No branches or pull requests

5 participants