Skip to content

Commit

Permalink
fix: address deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Mar 22, 2024
1 parent b8d120d commit bf802b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/no-untyped-mock-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit bf802b2

Please # to comment.