Skip to content

Commit

Permalink
remove useless condition
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Nov 28, 2023
1 parent 2b8dae8 commit b283e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8331,7 +8331,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return factory.createStringLiteral(name, !!singleQuote);
}
if (isNumericLiteralName(name) && startsWith(name, "-")) {
return factory.createComputedPropertyName(+name < 0 ? factory.createPrefixUnaryExpression(SyntaxKind.MinusToken, factory.createNumericLiteral(-name)) : factory.createNumericLiteral(+name));
return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(SyntaxKind.MinusToken, factory.createNumericLiteral(-name)));
}
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
}
Expand Down

0 comments on commit b283e9a

Please sign in to comment.