import { ReadableApp , SynchronousStreamable } from "@scramjet/types" ; import { PassThrough } from "stream" ; export = async function ( _stream ) { console . log ( "Avengers sequence started" ) ; const ps = new PassThrough ( ) ; ps . write ( "{ \"name\": \"Hulk\" }\n" ) ; ( ps as SynchronousStreamable < any > ) . topic = "avengers" ; ( ps as SynchronousStreamable < any > ) . contentType = "application/x-ndjson" ; return ps ; } as ReadableApp < any > ;