Skip to content

Commit

Permalink
Update interfaces.ts
Browse files Browse the repository at this point in the history
Getting the following error when I run build because of this type here. I think it might be a bit too broad. Scoped it down to be Record<string, any> which seems like a better fit than object

$ barrelsby --config .barrelsby.json
node_modules/@tsed/platform-cache/lib/types/interfaces/interfaces.d.ts:13:82 - error TS2344: Type 'Config' does not satisfy the constraint 'Record<string, unknown>'.
  Type 'object' is not assignable to type 'Record<string, unknown>'.
    Index signature for type 'string' is missing in type '{}'.

13     store?: "memory" | Store | PlatformCacheLegacyStoreFactory | FactoryStore<S, Config>;
                                                                                    ~~~~~~


Found 1 error in node_modules/@tsed/platform-cache/lib/types/interfaces/interfaces.d.ts:13
  • Loading branch information
csprance authored and Romakita committed Jun 13, 2024
1 parent b1a7662 commit a829a95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type PlatformCacheLegacyStoreFactory = {
create(...args: any[]): Promise<Store | any> | Store | any;
};

export type PlatformCacheSettings<Config extends object = any, S extends Store = any> = CachingConfig<Config> & {
export type PlatformCacheSettings<Config extends Record<string, any> = any, S extends Store = any> = CachingConfig<Config> & {
caches?: Cache[];
store?: "memory" | Store | PlatformCacheLegacyStoreFactory | FactoryStore<S, Config>;
max?: number;
Expand Down

0 comments on commit a829a95

Please sign in to comment.