refactor: Make PassthroughStore generic

This commit is contained in:
Ruben Verborgh
2020-09-07 09:11:55 +02:00
committed by Joachim Van Herwegen
parent 0ed1ae539d
commit 3d9507879b
3 changed files with 7 additions and 7 deletions

View File

@@ -10,10 +10,10 @@ import { ResourceStore } from './ResourceStore';
* If the original store supports the {@link Patch}, behaviour will be identical,
* otherwise the {@link PatchHandler} will be called instead.
*/
export class PatchingStore extends PassthroughStore {
export class PatchingStore<T extends ResourceStore = ResourceStore> extends PassthroughStore<T> {
private readonly patcher: PatchHandler;
public constructor(source: ResourceStore, patcher: PatchHandler) {
public constructor(source: T, patcher: PatchHandler) {
super(source);
this.patcher = patcher;
}