-
Notifications
You must be signed in to change notification settings - Fork 5
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 build #80
Conversation
I think that change is probably fine with a major version bump. |
67a571e
to
c8c6c87
Compare
This PR actually now has exact snapshot matches to the current main branch which is nice, uses private fields on the variant class to accomplish this this has a minimum build ES2015 (unable to compile down to es5) also the documentation module did not understand the private fields produced error
The line Is exactly the line in src/parse.ts that the private field is used So, documentation module removed for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Glad to see this get TypeScript-ified.
I was able to get documentation-js working, see here: add_tsc...add_tsc_gs, along with just a couple minor things to help avoid ts-ignores.
excellent :) |
merged this branch here |
I was trying to use this branch under node.js and it was sufficiently difficult (since neither es2015 or es2018 are commonjs formats) and using ESM under nodejs is somewhat difficult to use (because it REQUIRES you to have extensions on your imports e.g. Therefore I made this branch go back to the dynamically created class type that is on the current master branch for this repo 3e31a3b |
Possible method to upgrade @gmod/vcf to use typescript
Adds a "variant class" that keeps a handle to the parser object. Adds a toJSON method that should be used instead of spreading the variant object directly (which is done in VcfFeature) because that spreads the parser contents also. Could try to workaround this if this is undesirable, but there is a small change to the jbrowse 2 codebase for the VcfFeature->toJSON method.