import { ClientServerProxy , ServerProxy } from "./proxy" ; export const isNonModuleProxy = < P = ClientServerProxy | ServerProxy > ( value ) : value is P => { return value && typeof value === "object" && typeof value . onEvent === "function" ; } ; export const isPromise = ( value ) : value is Promise < any > => { return typeof value . then === "function" && typeof value . catch === "function" ; } ; export const withEnv = < T extends { env ? : NodeJS . ProcessEnv ; } > ( options ? ) : T => { return options && options . env ? { ... options , env : { ... process . env , ... options . env , } , } : options || ( { } as T ) ; } ; export interface Disposable { dispose : ( ) => void | Promise < void > ; }