Skip to content

Commit

Permalink
refactor: simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve authored Aug 27, 2023
1 parent c3fe6b9 commit e389396
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ export function printVueAcceptableTypeLiteralFromSymbols(
const typeString = typeChecker.typeToString(
typeChecker.getBaseTypeOfLiteralType(type),
);
let questionMark = "";
if (decl.questionToken) {
questionMark = "?";
}
push(
let questionMark =decl.questionToken?'?': "";

Check failure on line 56 in src/core/utils.ts

View workflow job for this annotation

GitHub Actions / lint

'questionMark' is never reassigned. Use 'const' instead
push(
`${decl.name.getText()}${questionMark}: ${toVueAcceptableType(
typeString,
)};`,
Expand Down

0 comments on commit e389396

Please sign in to comment.