mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-30 20:04:47 +00:00
Fix: Merge conflict
Co-authored-by: Drew Ansbacher <drew.ansbacher@gmail.com>
This commit is contained in:
@@ -1,17 +1,13 @@
|
|||||||
import { Observable } from 'rxjs'
|
import { Observable } from "rxjs";
|
||||||
import { map } from 'rxjs/operators'
|
import { map } from "rxjs/operators";
|
||||||
import { Update } from '../types'
|
import { Update } from "../types";
|
||||||
import { Source } from './source'
|
import { Source } from "./source";
|
||||||
import { RPCResponse } from './ws-source'
|
import { RPCResponse } from "./ws-source";
|
||||||
|
|
||||||
export class MockSource<T> implements Source<T> {
|
export class MockSource<T> implements Source<T> {
|
||||||
|
constructor(private readonly seed: Observable<Update<T>>) {}
|
||||||
|
|
||||||
constructor (
|
watch$(): Observable<RPCResponse<Update<T>>> {
|
||||||
private readonly seed: Observable<Update<T>>,
|
return this.seed.pipe(map((result) => ({ result, jsonrpc: "2.0" })));
|
||||||
) { }
|
|
||||||
|
|
||||||
watch$ (): Observable<RPCResponse<Update<T>>> {
|
|
||||||
return this.seed.pipe(map(result => ({ result,
|
|
||||||
jsonrpc: '2.0' })))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user