-
Notifications
You must be signed in to change notification settings - Fork 7
Add types property to use generated declaration file rather than source #6
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
Conversation
Instead references the file. This addresses an issue I've experienced which prevents me compiling my project as I have noImplicitReturns flag activated. (The problem function is in [remove Node](https://github.com/ShieldBattery/node-interval-tree/blob/master/index.ts#L386), but I can't actually see why there is an error (Error is Not all code paths return a value))
I'm not sure the correct solution here is to remove the inclusion of the source file when publishing. That was a conscious decision. Instead, I think that we should just fix the error that you're getting. After a closer inspection, the You could just add a |
Is that to allow anyone who encounters an exception when running to see the source using the source map? This has a disadvantage however if someone is using a more strict Also, I'm sorry, but I still am being very unobservant and am having trouble spotting where the unreturned value is 😕 . Could you please just fix that yourself - sorry! |
I included the source file in my published files so it's possible to see the source code in the package without tracking it on github, which some people might want to do. One thing I'm confused about your situation is why is your build process even failing due to this file? This file is not included anywhere and it's not used, so it definitely shouldn't be used by any build process, or linters. Can you check your |
This issue is happening because I import something from node-interval-tree, and therefore typescript looks in The fix is just to add a Also, I do understand adding the source code into the package, because as well as what you said, it allows the source map to work properly. |
Ahh, thanks for the explanation. I'm not really that familiar with TypeScript, so this stuff is pretty confusing. |
This is now merged and new version has been released. Thanks for your help! |
No Problem. Happy to help! |
Instead references the declaration file. This addresses an issue I've experienced which prevents me compiling my project as I have noImplicitReturns flag activated. (The problem function is in remove Node, but I can't actually see why there is an error (Error is Not all code paths return a value))