-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
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
Require Node.js 12.20 and move to ESM #76
Conversation
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
CI is failing |
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
propertyKey: string, | ||
descriptor: PropertyDescriptor, | ||
): void => { | ||
const input = target[propertyKey]; // eslint-disable-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These errors must be ignored because target: any
and there is currently no viable alternative.
https://stackoverflow.com/questions/68343539/typescript-definition-of-target-in-a-decorator
|
||
const cacheItem = cache.get(key); | ||
if (cacheItem) { | ||
return cacheItem.data; | ||
return cacheItem.data; // eslint-disable-line @typescript-eslint/no-unsafe-return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the return value of AnyFunction
is any
and FunctionToMemoize extends AnyFunction
, the linter assumes that ReturnType<FunctionToMemoize>
is any
. However, the error is that any
is not assignable to ReturnType<FunctionToMemoize>
:
✖ 118:4 Unsafe return of type any from function with return type ReturnType<FunctionToMemoize>. @typescript-eslint/no-unsafe-return
This might be a bug with typescript-eslint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a bug with typescript-eslint.
Open an issue ;)
Looks good ;) |
No description provided.