return type is actual subclass options, not the options of ViewModel

This commit is contained in:
Bruno Windels 2022-06-02 17:30:43 +02:00
parent c8b5c6dd41
commit 5280467e66

View File

@ -47,7 +47,7 @@ export class ViewModel<O extends Options = Options> extends EventEmitter<{change
this._options = options; this._options = options;
} }
childOptions<T extends Object>(explicitOptions: T): T & Options { childOptions<T extends Object>(explicitOptions: T): T & O {
return Object.assign({}, this._options, explicitOptions); return Object.assign({}, this._options, explicitOptions);
} }