mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
add mock source
This commit is contained in:
committed by
Aiden McClelland
parent
a724d6ec6b
commit
678d7b3322
14
client/lib/source/mock-source.ts
Normal file
14
client/lib/source/mock-source.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Observable } from 'rxjs'
|
||||
import { Update } from '../types'
|
||||
import { Source } from './source'
|
||||
|
||||
export class MockSource<T> implements Source<T> {
|
||||
|
||||
constructor (
|
||||
private readonly seed: Observable<Update<T>>,
|
||||
) { }
|
||||
|
||||
watch$ (): Observable<Update<T>> {
|
||||
return this.seed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user