-
Notifications
You must be signed in to change notification settings - Fork 71
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
TypeScript compiler errors when importing some file(s) if we use "strict": true
at tsconfig.json
#174
Comments
Do you like me to open an MR regarding this? |
Hey, thanks for reporting this. In the meantime, you can try to add |
Thanks @mirceanis ,
This is because I could not import the function I need directly. I could only import it using:
And that is because the functions inside did-jwt/src/util are not exported in the index file. I think we need to add the following to did-jwt/src/index.tx as follow:
What do you think? Many thanks, |
The required methods are small enough to be implemented directly in your code-base. If we export them from did-jwt then we would have to maintain them in future versions and at the moment they are out of the scope of this library. |
…175) * fix(build): produce non-minified output for module fixes #173 * fix(build): fix strict compiler errors for most of the code fixes #174 * chore(ci): adjust bot schedule for less noise * fix(style): enable strict mode and fix strict compiler errors * chore(style): enable eslint and fix linter errors * chore: clarify usage of JWK epk and proof types for signing
🎉 This issue has been resolved in version 5.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The problem
TypeScript compiler errors when importing some file(s) if we use
"strict": true
at tsconfig.json.Details
I have the following
When
import { toJose } from 'did-jwt/src/util';
the following error came:Describe the solution you'd like
I suggest to enable
strict
mode for the TypeScript compiler and fix for related issues. This will make the library more usable for other projects.Describe alternatives you've considered
I had to use
"strict": false
at my tsconfig.json which is something not desired.The text was updated successfully, but these errors were encountered: