From bf802b2ec9ba5f14ecf53111dd201edf2d6ab603 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Fri, 22 Mar 2024 13:10:26 +1300 Subject: [PATCH] fix: address deprecation warning --- src/rules/no-untyped-mock-factory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rules/no-untyped-mock-factory.ts b/src/rules/no-untyped-mock-factory.ts index e67021494..86b54e426 100644 --- a/src/rules/no-untyped-mock-factory.ts +++ b/src/rules/no-untyped-mock-factory.ts @@ -36,7 +36,7 @@ export default createRule({ create(context) { return { CallExpression(node: TSESTree.CallExpression): void { - const { callee, typeParameters } = node; + const { callee, typeArguments = node.typeParameters } = node; if (callee.type !== AST_NODE_TYPES.MemberExpression) { return; @@ -53,7 +53,7 @@ export default createRule({ const [nameNode, factoryNode] = node.arguments; const hasTypeParameter = - typeParameters !== undefined && typeParameters.params.length > 0; + typeArguments !== undefined && typeArguments.params.length > 0; const hasReturnType = isFunction(factoryNode) && factoryNode.returnType !== undefined;