When as is used on the result of the createMemo in TypeScript, this warning is triggered:
For proper analysis, a variable should be used to capture the result of this function call.eslint[solid/reactivity](https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/reactivity.md)
Removing as fixes the issue.
To Reproduce
const value = createMemo(() => {
// things
}) as MyType
Expected behavior
Support as
Screenshots
Environment (please complete the following information):
OS: [e.g. Mac OS 11, Windows 10] Windows 11
Node version (node --version): 18
eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.9.1
eslint version (npm list eslint/yarn why eslint): 8.30.0
Additional context
[ ] I would be willing to contribute a PR to fix this issue
Describe the bug
When
as
is used on the result of thecreateMemo
in TypeScript, this warning is triggered:Removing
as
fixes the issue.To Reproduce
Expected behavior
Support as
Screenshots
Environment (please complete the following information):
node --version
): 18eslint-plugin-solid
version (npm list eslint-plugin-solid
/yarn why eslint-plugin-solid
): 0.9.1eslint
version (npm list eslint
/yarn why eslint
): 8.30.0Additional context