Skip to content

Commit

Permalink
Make params less strict (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Oct 11, 2022
1 parent 42bcc3f commit 40f5a2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/CachingOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export class CachingOperation<LoadedValue> {
private readonly cacheIndexes: readonly number[]
private readonly runningLoads: Map<string, Promise<LoadedValue | undefined | null> | undefined>

constructor(caches: readonly Cache<LoadedValue>[], params: CachingOperationConfig = DEFAULT_CONFIG) {
constructor(caches: readonly Cache<LoadedValue>[], params: Partial<CachingOperationConfig> = DEFAULT_CONFIG) {
this.params = {
...DEFAULT_CONFIG,
...params,
}
this.caches = caches
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "layered-loader",
"version": "4.1.0",
"version": "4.1.1",
"description": "Data loader with support for caching and fallback data sources ",
"license": "MIT",
"maintainers": [
Expand Down

0 comments on commit 40f5a2d

Please sign in to comment.