From 6b26a62a0f4c647889365d7c41989ce1d1122fca Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Fri, 10 Jul 2020 17:09:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#45819=20Fix=20n3?= =?UTF-8?q?=20import=20method=20not=20being=20generic=20enough=20by=20@rub?= =?UTF-8?q?ensworks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/n3/index.d.ts | 2 +- types/n3/n3-tests.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/n3/index.d.ts b/types/n3/index.d.ts index eb52abd041..6e0a8bee54 100644 --- a/types/n3/index.d.ts +++ b/types/n3/index.d.ts @@ -170,7 +170,7 @@ export class Writer { list(triple: Array): Quad_Object[]; } -export class StreamWriter extends stream.Transform implements RDF.Sink, EventEmitter> { +export class StreamWriter extends stream.Transform implements RDF.Sink, EventEmitter> { constructor(options?: WriterOptions); constructor(fd: any, options?: WriterOptions); import(stream: RDF.Stream): EventEmitter; diff --git a/types/n3/n3-tests.ts b/types/n3/n3-tests.ts index 5f4945f101..26e88cb39a 100644 --- a/types/n3/n3-tests.ts +++ b/types/n3/n3-tests.ts @@ -152,6 +152,12 @@ function test_doc_from_triple_stream_to_rdf_stream() { streamWriter.pipe(process.stdout); } +function test_doc_streamwriter_import() { + const quadStream: RDF.Stream = {} as any; + const streamWriter: N3.StreamWriter = new N3.StreamWriter({ prefixes: { c: N3.DataFactory.namedNode('http://example.org/cartoons#') } }); + streamWriter.import(quadStream); +} + function test_doc_blank_nodes_and_lists() { const writer: N3.Writer = new N3.Writer({ prefixes: {