-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Describe the bug
This library includes its own type definitions for sparqljs. These definitions conflict with the ones hosted on DefinitelyTyped that are used by other projects. These incompatibilities make it very difficult to use sparql-engine in an application that also uses other libraries that depend on the DefinitelyTyped defintions. Importing from 'sparqljs' will resolve to @types/sparqljs rather than the custom ones (which is what is desired some of the time). Could you please transition to using the types provided by DefinitelyTyped (ideally from v3)?
To Reproduce
Steps to reproduce the behavior:
- Create a TypeScript NodeJS application (see e.g. https://www.digitalocean.com/community/tutorials/setting-up-a-node-project-with-typescript)
- Install sparql-engine and @types/sparqljs (or another library that depends on @types/sparqljs)
- Attempt to create a custom sparql-engine Graph and import needed types from sparqljs
- The system tries to import from @types/sparqljs instead of sparql-engine/types/sparqljs
I've managed to alter my .tsconfig file to prefer one set of definitions over the other, but this fails when it needs to use both.
Expected behavior
Only a single set of types should exist with the given name. Apps within the TypeScript SPARQL ecosystem should be able to share type definitions as much as possible.
The DefinitelyTyped definitions are here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/sparqljs/index.d.ts