Skip to content

Instantly share code, notes, and snippets.

@joeltg
Created October 16, 2020 16:15
Show Gist options
  • Save joeltg/dc406f4c567dcab1da98cf19b2b8a6d8 to your computer and use it in GitHub Desktop.
Save joeltg/dc406f4c567dcab1da98cf19b2b8a6d8 to your computer and use it in GitHub Desktop.
TypeScript module declaration for rdf-canonize
declare module "rdf-canonize" {
type Term = {
termType: string
value: string
language?: string
datatype?: Term
}
type Quad = { subject: Term; predicate: Term; object: Term; graph: Term }
function canonize(
dataset: Quad[],
options: { algorithm: "URDNA2015" }
): Promise<string>
function canonizeSync(
dataset: Quad[],
options: { algorithm: "URDNA2015" }
): string
}
{
"version": "0.1.1",
"name": "@types/rdf-canonize",
"main": "",
"types": "index.d.ts"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment