Skip to content

Commit b285e3b

Browse files
ocarlottNgo, Minh
and
Ngo, Minh
authored
fix: Removed conflict in type for create static method and made opts parameter optional (#313)
Co-authored-by: Ngo, Minh <[email protected]>
1 parent 91681d5 commit b285e3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AsyncStorageFactory {
1919

2020
static create<M = EmptyStorageModel>(
2121
storage: IStorageBackend,
22-
opts: FactoryOptions | null = null,
22+
opts?: FactoryOptions,
2323
) {
2424
return new AsyncStorage<M, IStorageBackend<M>>(
2525
storage,

packages/core/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
export default class AsyncStorageFactory {
1414
static create<M = EmptyStorageModel>(
1515
storage: IStorageBackend,
16-
opts: FactoryOptions,
16+
opts?: FactoryOptions,
1717
): AsyncStorage<M, IStorageBackend<M>>;
1818
}
1919

0 commit comments

Comments
 (0)