Skip to content

Incompatible sparqljs Type Definitions #58

@thatcort

Description

@thatcort

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:

  1. Create a TypeScript NodeJS application (see e.g. https://www.digitalocean.com/community/tutorials/setting-up-a-node-project-with-typescript)
  2. Install sparql-engine and @types/sparqljs (or another library that depends on @types/sparqljs)
  3. Attempt to create a custom sparql-engine Graph and import needed types from sparqljs
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededpartially fixedA partial fix has been applied

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions