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

@@ -16,10 +16,10 @@ import { ResourceStore } from './ResourceStore';
* Even if there is a match with the output from the store,
* if there is a low weight for that type conversions might still be preferred.
*/
export class RepresentationConvertingStore extends PassthroughStore {
export class RepresentationConvertingStore<T extends ResourceStore = ResourceStore> extends PassthroughStore<T> {
private readonly converter: RepresentationConverter;
public constructor(source: ResourceStore, converter: RepresentationConverter) {
public constructor(source: T, converter: RepresentationConverter) {
super(source);
this.converter = converter;
}