mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
With the current order, I have to cast to unknown and then to `Promise<any>`
```
public set<T>(key: string, value: T, options: CacheManager.CachingConfig): Promise<any> {
return (this.client.set(key, value, options) as unknown) as Promise<any>;
}
```
With the new order I can just do:
```
public set<T>(key: string, value: T, options: CacheManager.CachingConfig) { // returns type is Promise<any>
return (this.client.set(key, value, options);
}
```
and
```
public set<T>(key: string, value: T, options: CacheManager.CachingConfig) { // returns type is void
return (this.client.set(key, value, options, ()=> {});
}
```
|
||
|---|---|---|
| .. | ||
| cache-manager-tests.ts | ||
| index.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||