fix: Generalize typing on pushQuad.

This commit is contained in:
Ruben Verborgh 2021-01-08 23:19:29 +01:00
parent 1d5144c293
commit 27a115022b

View File

@ -1,4 +1,4 @@
import type { Readable, PassThrough } from 'stream';
import type { Readable } from 'stream';
import arrayifyStream from 'arrayify-stream';
import type { ParserOptions } from 'n3';
import { DataFactory, StreamParser, StreamWriter } from 'n3';
@ -12,7 +12,7 @@ import { toSubjectTerm, toPredicateTerm, toObjectTerm } from './TermUtil';
* Generates a quad with the given subject/predicate/object and pushes it to the given array.
*/
export function pushQuad(
quads: Quad[] | PassThrough,
quads: Quad[] | Readable,
subject: string | NamedNode,
predicate: string | NamedNode,
object: string | NamedNode | Literal,