From 318a76f57ee2aa97a63d3dbcad3886cc6287f52c Mon Sep 17 00:00:00 2001 From: Jonas Erbe Date: Mon, 8 Apr 2019 11:38:17 +0200 Subject: [PATCH] Fixed build error in "jsonld-test.ts". Log function accepts also strings now. --- types/jsonld/jsonld-tests.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/jsonld/jsonld-tests.ts b/types/jsonld/jsonld-tests.ts index 837d2ad176..dc7b2b2c4d 100644 --- a/types/jsonld/jsonld-tests.ts +++ b/types/jsonld/jsonld-tests.ts @@ -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); + } } /**