Giter VIP home page Giter VIP logo

rdf-string's Issues

Ordering dataset output

import { turtle } from '@tpluscode/rdf-string'

turtle`${dataset}`.toString({
  ordered: true,
})

The example is turtle, but should apply also to other formats ordering by graph (where applicable), subject, predicate, object

Type resolution with `node16` and `nodeNext`

I get errors when trying to use the library in typescript module with moduleResolution node16 or nodeNext.

e.g.

Could not find a declaration file for module '@tpluscode/rdf-string'. '/workspaces/my-project/node_modules/@tpluscode/rdf-string/index.mjs' implicitly has an 'any' type.
  There are types at '/workspaces/my-project/node_modules/@tpluscode/rdf-string/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@tpluscode/rdf-string' library may need to update its package.json or typings.

Inlining additional prefixes

import { turtle } from '@tpluscode/rdf-string'

turtle`${dataset}`.toString({
  prefixes: {
    dbr: 'http://dbpedia.org/resource/',
  }
})

NamedNode is not generic

I'm getting the following error because type declarations use NamedNode with a type parameter.

node_modules/@tpluscode/rdf-string/lib/nquads.d.ts:18:132 - error TS2315: Type 'NamedNode' is not generic.

18 export declare const nquads: (strings: TemplateStringsArray, ...values: Value<TemplateResult<NQuadsOptions>, BlankNode | Literal | 
NamedNode<string>>[]) => TemplateResult<NQuadsOptions>;

The .d.ts files get generated like that despite the fact that the ts code contains no such argument. It seems to be a bug in typescript that is solved by updating typescript.

namespace is not a function

I double checked that my project has no older dependency than the ones in rdf-string but I'm still getting the following error:

    C:\Users\me\Documents\retog\rdfjs-dataset-sparql\node_modules\@tpluscode\rdf-ns-builders\vocabularies\as.js:1
    TypeError: namespace is not a function

      at Object.<anonymous> (node_modules/@tpluscode/rdf-ns-builders/vocabularies/as.js:2:19)
          at Object.<anonymous> (C:\Users\me\Documents\retog\rdfjs-dataset-sparql\node_modules\@tpluscode\rdf-ns-builders\index.js:1)

Any idea what could be causing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.