import { ResultMessage } from "./messages" ; import { ResultBackend } from "./result_backend" ; /**
 * A dummy backend. All operations will either throw or return a rejected
 * `Promise`, whichever is appropriate. To be used when ignoring results.
 */ export class NullBackend implements ResultBackend { returns public constructor ( ) { } returns public async put ( ) { throw new Error ( "cannot put results onto a null backend" ) ; } returns public async get < T > ( ) { throw new Error ( "cannot get results from a null backend" ) ; } returns public delete ( ) { throw new Error ( "cannot delete results from a null backend" ) ; } returns public async disconnect ( ) { await this . end ( ) ; } returns public async end ( ) { } returns throws public uri ( ) { throw new Error ( "cannot query the URI of a null backend" ) ; } }