stardog-union/stardog.js

Clarify the db.create signature

maka-io opened this issue · 1 comments

The documentation says:
options ({ files: { filename: string}[] })

That isn't real json / javascript. Could you clarify?

jmrog commented

The documentation says:
options ({ files: { filename: string}[] })

That isn't real json / javascript. Could you clarify?

Sorry for the confusion. This is a type annotation, so while it isn't "real json/javascript," it is real TypeScript (and is also similar in style to JSDoc type annotations). What it means is that the options parameter should be an object with a files property, where the value of the files property should be an array of objects each of which has a string filename property. In other words, the options parameter should look like this:

{
  files: [
    {
      filename: 'myFile1.txt',
    },
    {
      filename: 'myFile2.txt',
    }
  ],
}