Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurusXI committed Nov 18, 2023
1 parent 77396c6 commit d7998f8
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class MultilevelCache {

public namespace: string;

constructor(options: CreateCacheOptions, redis: Redis | Cluster, logger?: Logger) {
constructor(options: CreateCacheOptions<any>, redis: Redis | Cluster, logger?: Logger) {
this.namespace = `sugar-cache:${options.namespace || 'default'}`;
options.namespace = this.namespace;

Expand Down
2 changes: 1 addition & 1 deletion lib/cache/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class InMemoryCache extends Cache {

private memUsageThreshold: number;

constructor(options: CreateCacheOptions, logger?: Logger) {
constructor(options: CreateCacheOptions<any>, logger?: Logger) {
const { namespace, inMemoryCache: inMemoryCacheOptions } = options;
super(namespace, logger);
this.enabled = inMemoryCacheOptions?.enable ?? true;
Expand Down
2 changes: 1 addition & 1 deletion lib/cache/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Cache from './base';
export default class RedisCache extends Cache {
private redis: Redis | Cluster;

constructor(redis: Redis | Cluster, options: CreateCacheOptions, logger?: Logger) {
constructor(redis: Redis | Cluster, options: CreateCacheOptions<any>, logger?: Logger) {
const { namespace } = options;
super(namespace, logger);
this.redis = redis;
Expand Down
35 changes: 27 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"devDependencies": {
"@types/jest": "^29.5.8",
"@types/node": "^20.9.1",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.53.0",
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"esModuleInterop": true,
"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "dist",
"baseUrl": "./lib/",
},
Expand Down

0 comments on commit d7998f8

Please sign in to comment.