We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found that this did not work:
import { Event } from 'nostr-tools/lib/types/pure';
In order to get this to work:
import { Event } from 'nostr-tools/pure';
I had to add this to tsconfig.json:
{ "compilerOptions": { "paths": { "nostr-tools/*": ["./node_modules/nostr-tools/lib/types/*"] } }
The text was updated successfully, but these errors were encountered:
What version of TypeScript?
I think it should work out of the box because of the stuff we have in package.json, but I don't understand TypeScript.
Why can't you just import from nostr-tools/pure directly?
nostr-tools/pure
Sorry, something went wrong.
https://arethetypeswrong.github.io/?p=nostr-tools%402.1.2
This is a great resource. Thanks for posting.
What version of TypeScript? I think it should work out of the box because of the stuff we have in package.json, but I don't understand TypeScript. Why can't you just import from nostr-tools/pure directly?
Latest version, of course. I imagine most consumers of nostr-tools are using it with Node. I'm using it in the browser in a TypeScript React project.
This can probably be fixed with an export file at the root of the project.
No branches or pull requests
I found that this did not work:
In order to get this to work:
I had to add this to tsconfig.json:
The text was updated successfully, but these errors were encountered: