Fixed build error in "jsonld-test.ts".

Log function accepts also strings now.
This commit is contained in:
Jonas Erbe 2019-04-08 11:38:17 +02:00
parent 54ea233e00
commit 318a76f57e

View File

@ -24,10 +24,14 @@ const frame = doc;
const docRDF = jsonld.toRDF(doc);
let count = 0;
function log(doc: object) {
function log(doc: object|string) {
count++;
// Uncomment if testing with node.js
// console.log(count + ": " + JSON.stringify(doc) + "\n");
if (typeof doc === 'object') {
// console.log(count + ": " + JSON.stringify(doc) + "\n");
} else {
// console.log(doc);
}
}
/**