Skip to content

Commit 21ca59e

Browse files
committed
chore: simplify typings
1 parent b0c1a16 commit 21ca59e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/packages/core/store/store-object-base.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
88
* The base class for a store that holds an object.
99
*/
1010
export class UmbStoreObjectBase<T> extends UmbContextBase<never> implements UmbApi {
11-
protected _data: UmbObjectState<T | undefined>;
11+
protected _data;
1212

1313
constructor(host: UmbControllerHost, storeAlias: string, initialData?: T) {
1414
super(host, storeAlias);
15-
this._data = new UmbObjectState(initialData);
15+
this._data = new UmbObjectState<T | null>(initialData ?? null);
1616
}
1717

1818
/**
@@ -29,7 +29,7 @@ export class UmbStoreObjectBase<T> extends UmbContextBase<never> implements UmbA
2929
* Returns the current state of the store
3030
* @memberof UmbStoreObjectBase
3131
*/
32-
getState(): T | undefined {
32+
getState() {
3333
return this._data.getValue();
3434
}
3535

0 commit comments

Comments
 (0)