correct typings of simple states

This commit is contained in:
Niels Lyngsø
2023-01-24 14:13:10 +01:00
parent eee77fff33
commit 749a231559
3 changed files with 10 additions and 5 deletions

View File

@@ -3,9 +3,11 @@ import { BasicState } from "./basic-state";
/**
* @export
* @class StringState
* @extends {BehaviorSubject<T>}
* @extends {BasicState<T>}
* @description - A RxJS BehaviorSubject this Subject ensures the data is unique, not updating any Observes unless there is an actual change of the value.
*/
export class StringState<T extends string | undefined | null> extends BasicState<T> {
export class StringState<T> extends BasicState<T | string> {
constructor(initialData: T | string) {
super(initialData);
}
}