import { Transform , TransformCallback } from 'stream' ; import { Query } from '@cucumber/gherkin-utils' ; import * as messages from '@cucumber/messages' ; export default class GherkinQueryStream extends Transform { constructor ( private readonly gherkinQuery ) { super ( { readableObjectMode : true , writableObjectMode : true } ) ; } _transform ( envelope , encoding , callback ) { this . gherkinQuery . update ( envelope ) ; callback ( null , envelope ) ; } }