-
Notifications
You must be signed in to change notification settings - Fork 3
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
NPM module does not include type declaration files #6
Comments
I don't think that sounds right. My understanding is that Typescript code already comes with the type information, and so does not need .d.ts files. What you have are compiler errors anyways, so completely unrelated. Anyways, on to the actual issue, that the library errors when compiling with
I do not want to remove this line, in case library users want to use it. I think changing
Ok, that is a legitimate issue. Will fix. Probably Thanks for reporting. |
Oh, I did discover that the js files |
@GoudaSoftware In banani v1.0.5 (commit 295e180), should now compile with |
Wow! Thanks for such a quick response. Yeah the issue definitely is that typescript enforces rules for dependency sources when compiling. Which seems like a reasonable thing to skip. And after reading a bit more, as you say, a lot of resources do seem to indicate Honestly, I feel like there's still some improvement that could be made here, but I couldn't tell you exactly what it is. And I'm ok with that. I just tried As an aside, thanks for this library. I'm just learning to work with banano and this is way easier to understand than bananojs. |
That was the goal! Glad to hear that, and glad that the issue seems to be resolved. |
I'll start off by saying I'm rather inexperienced javascript and typescript, so forgive me if this sounds imprecise or my understanding is simply incorrect.
I'm writing a node.js project using typescript. I imported banani using
import
statements, as I'm preferring these overrequire
. e.g.import {Wallet, RPC} from "banani";
When running
tsc
in my project I get a number of errors such as:or
It took me a while to figure what was going. It was because I had typescript set to strict. Here is my tsconfig, which was mostly generated by the firebase cli:
In order to successfully compile after importing banani, I need to set
strict
andnoUnusedLocal
to false.Ideally I wouldn't have to disable strict mode because of a dependency. After a bit of reading, my understanding is that the banani module should be supplying
.d.ts
declaration files instead of the.ts
files it has now.Does that sound right?
The text was updated successfully, but these errors were encountered: