Skip to content

Commit

Permalink
Fix issue S1530 on function isTypeAString
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmorand-sonarsource committed Jan 31, 2024
1 parent a0ab361 commit ecb5770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S2871/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ export const rule: Rule.RuleModule = {
typeArgument = type;
}

function isTypeAString(candidate: ts.Type): boolean {
const isTypeAString = (candidate: ts.Type): boolean => {
return candidate.flags === 4;
}
};

const types = isAUnionType(typeArgument) ? typeArgument.types : [typeArgument];

Expand Down

0 comments on commit ecb5770

Please sign in to comment.