We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7015f50 commit b566d0aCopy full SHA for b566d0a
server/src/rules/callExpression.ts
@@ -18,7 +18,7 @@ export const callExpressionRule = new class extends Rule<CallExpression> {
18
let declaration = ast.findDeclarationByName(callee.name, loc)
19
if (declaration !== undefined) {
20
// We cannot check for let because they can be reassigned. Constants assigned to lambdas will still be "func"
21
- if (declaration.meta === "const")
+ if (declaration.meta === "const" && declaration.declarationKind !== DeclarationKind.KIND_PARAM)
22
ast.addDiagnostic(`'${callee.name}' is not a function`, DiagnosticSeverity.Error, loc);
23
if (declaration.parameters !== undefined || declaration.declarationKind === DeclarationKind.KIND_IMPORT) {
24
let hasRestElement = false;
0 commit comments