diff --git a/packages/eslint-plugin-qwik/qwik.unit.ts b/packages/eslint-plugin-qwik/qwik.unit.ts index f4ad8edf232..32647180187 100644 --- a/packages/eslint-plugin-qwik/qwik.unit.ts +++ b/packages/eslint-plugin-qwik/qwik.unit.ts @@ -104,6 +104,11 @@ export const HelloWorld = component$(async () => { return
}); });`, + `export const HelloWorld = component$(async () => { + const test = useFunction() as string; + + }); + `, ], invalid: [ { diff --git a/packages/eslint-plugin-qwik/src/useMethodUsage.ts b/packages/eslint-plugin-qwik/src/useMethodUsage.ts index d62551ec25f..14ee36c32bc 100644 --- a/packages/eslint-plugin-qwik/src/useMethodUsage.ts +++ b/packages/eslint-plugin-qwik/src/useMethodUsage.ts @@ -63,6 +63,7 @@ export const useMethodUsage: Rule.RuleModule = { case 'Property': case 'ObjectExpression': case 'CallExpression': + case 'TSAsExpression': break; case 'ArrowFunctionExpression': case 'FunctionExpression':