We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently the type of get method in CacheAdapter is:
CacheAdapter
get<T = any>(name: string): T | Promise<T> | undefined;
But, as non-promise return type allows undefined, I think Promise return type also needs to allow undefined.
undefined
get<T = any>(name: string): T | Promise<T | undefined> | undefined;
// Type error: Type 'T | undefined' is not assignable to type 'T' async get<T = unknown>(name: string): Promise<T | undefined> { // rest of the code }
None
6.0.2
Bun v1.0.25
No response
The text was updated successfully, but these errors were encountered:
PR welcome
Sorry, something went wrong.
gladly! I just handle this one.
CacheAdapter.get
Promise<undefined>
fix(core): allow CacheAdapter.get to return Promise<undefined> (#…
98ce1e5
…5200) Closes #5199
Successfully merging a pull request may close this issue.
Describe the bug
Currently the type of get method in
CacheAdapter
is:But, as non-promise return type allows
undefined
, I think Promise return type also needs to allowundefined
.Reproduction
What driver are you using?
None
MikroORM version
6.0.2
Node.js version
Bun v1.0.25
Operating system
No response
Validations
The text was updated successfully, but these errors were encountered: