-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add type declarations #6
Comments
I, and a handful other people, have been busy filling DefinitelyTyped with RDF/JS typings. I would add there too. @bergos actually did ask for declarations of
TBH, I tend to think otherwise lately. When the libraries are written in JS, it is beneficial that all declarations reside in the DefinitelyTyped repository and can be tested together when something changes in the upstream packages (well, |
@tpluscode I agree that in cases like this where the type declarations refelct the spec rather than the code it makes sense to have them in DefinitelyTyped. Still, I thhink a minimal type declaration (importing |
@tpluscode I'm having troubles aligning the type declaration @types/rdfjs__dataset, the spec and this implementaton.
Porting this project to TS would ensure consistency between type declaration and implementation. It still should be aligned to the spec. |
Yes, you're right @retog. The type declarations are quite inaccurate.
https://rdf.js.org/dataset-spec/#datasetcorefactory-interface
How so?
Mhm, good observation. This should be brought up in https://github.com/rdfjs/dataset-spec/
I don't disagree but this pretty much is not going to happen ;) |
Thanks for pointer and the fix.
yes I've seen and commented on rdfjs/dataset-spec#55
You think a PR wouldn't be accepted? Why not? I mean if this project was run by ES-purists there should be no npm-specific stuff and ceratinly no require/module.exports. TS at least generates standard compliant JS, not acceting it in the repo is like only accepting bitmaps but refusing the svgs from which they are generated (which is especially odd if you then need the reconstructed vectors in a sepate repo). |
We have agreed to not include typings directly in the rdfjs-base packages ( Most Please, let's collaborate there on the TS declarations |
A type declaration (index.d.ts) file analogous to https://github.com/rdfjs-base/data-model/blob/master/index.d.ts for this project to be usable in typescript. It is preferable to have the type declarations in the main project rather than relying on an exernal source.
The text was updated successfully, but these errors were encountered: