Skip to content

Commit

Permalink
fix: special handling of identifiers no longer required
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed May 6, 2024
1 parent 8eebe1f commit ec3670f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,9 @@ export function getTypeImmutabilityOfNode<
const overrides =
explicitOverrides ?? getImmutabilityOverrides(context.settings);
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
const typedNode = ts.isIdentifier(tsNode) ? tsNode.parent : tsNode;
const typeLike =
(typedNode as { type?: TypeNode }).type ??
getTypeOfNode(parserServices.tsNodeToESTreeNodeMap.get(typedNode), context);
(tsNode as { type?: TypeNode }).type ??
getTypeOfNode(parserServices.tsNodeToESTreeNodeMap.get(tsNode), context);

return getTypeImmutability(
parserServices.program,
Expand Down

0 comments on commit ec3670f

Please sign in to comment.