Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twenty-drinks-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/multistore": patch
---

[FIXED] Type issue in multistore package. Cache control `set` method returns `any` type and `get` returns `StoreConfig | undefined`. Also, `MiddlewareConfiguration` type has been removed as it is no longer necessary.
16 changes: 2 additions & 14 deletions packages/multistore/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export interface CacheManager {
/**
* Gets a store configuration from cache storage based on the `key` value.
*/
get(key: string): StoreConfig;
get(key: string): StoreConfig | undefined;

/**
* Sets a store configuration in the cache storage with identifier equals `key` value.
*/
set(key: string, value: StoreConfig): StoreConfig;
set(key: string, value: StoreConfig): unknown;
}

/**
Expand Down Expand Up @@ -43,18 +43,6 @@ export interface MultistoreExtensionMethods {
}) => Record<string, StoreConfig>;
}

export interface MiddlewareConfiguration {
/**
* Multistore configuration.
*/
multistore: MultistoreExtensionMethods;

/**
* Other configration entries, that are not being used by the multistore extension.
*/
[key: string]: any;
}

/**
* Parameters for updateConfig utility function.
*/
Expand Down