-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update type definitions for v7 #61
Comments
new version without the |
Hello, Thanks for your library , |
@r3mi types were added for |
I created the wikibase-types npm package for types returned by the wikibase / wikidata API. Its helpful but still not as good as a fully typed library. If someone has the time: The typings from #69 could be used to type this library on DefinitelyTyped but without this change the typings seem to get way more complicated than in #69. (Maybe I have overlooked something?) |
That seems weird to me, usually it's not up to the library to write hacks to ensure compatibility between CommonJS and ES modules. I thought that was what the |
These compiler options only help, as far as i understand, to import things into your lib. The types have to be correct for that in the first place. (Correct me if im wrong!) The problem in this case is the duplicate export of the common types. Normally you would create a namespace and the function with the same name and export that to follow the JS code. But you can not Having the default export you can simply Personally I think the time invested to type this could be also spent to refactor things. But thats up to everyone themselves. I only started to look differently onto source code since I started using TypeScript and I am not used to code which is used in front end / browsers. The way this library is built certainly has its purpose. |
Closing in favor of #82 |
@maxlath @noinkling @EdJoPaTo
In the meantime, you should push a new version without the
types
key inpackage.json
so as not to give people bad types automatically.The text was updated successfully, but these errors were encountered: