import { Writable } from 'stream' ; import { Query } from '@cucumber/query' ; import * as messages from '@cucumber/messages' ; export default class QueryStream extends Writable { constructor ( private readonly query ) { super ( { objectMode : true } ) ; } _write ( envelope , encoding , callback ) { this . query . update ( envelope ) ; callback ( null ) ; } }