mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-01 19:24:27 +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, ()=> {});
}
```