Skip to content

Commit e346855

Browse files
committed
fix lint
1 parent 7562a9d commit e346855

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5142,15 +5142,15 @@ namespace ts {
51425142
function getTypeFromTypeUnaryPrefixNode(node: TypeUnaryPrefix): NumericLiteralType {
51435143
const type = getTypeFromNumericLiteralTypeNode(node.operand) as NumericLiteralType;
51445144
if (node.operator === SyntaxKind.MinusToken) {
5145-
const text = "-"+type.text;
5145+
const text = "-" + type.text;
51465146
if (hasProperty(numericLiteralTypes, text)) {
51475147
return numericLiteralTypes[text];
51485148
}
51495149

51505150
const newType = numericLiteralTypes[text] = createType(TypeFlags.NumericLiteral) as NumericLiteralType;
51515151
newType.number = -type.number;
51525152
newType.text = text;
5153-
5153+
51545154
return newType;
51555155
}
51565156
return type;
@@ -5887,7 +5887,7 @@ namespace ts {
58875887
if (isNumericLiteralType(target)) return isNumericLiteralEquivalentTo(source as NumericLiteralType, target as NumericLiteralType);
58885888
if (target === numberType) return Ternary.True;
58895889
if (target.flags & TypeFlags.Enum) {
5890-
//TODO: If enum numeric value = numeric literal value, then true, else false
5890+
// TODO (weswig): If enum numeric value = numeric literal value, then true, else false
58915891
}
58925892
}
58935893
if (relation === assignableRelation || relation === comparableRelation) {
@@ -8771,7 +8771,7 @@ namespace ts {
87718771
function contextualTypeIsStringLiteralType(type: Type): boolean {
87728772
return !!(type.flags & TypeFlags.Union ? forEach((<UnionType>type).types, isStringLiteralType) : isStringLiteralType(type));
87738773
}
8774-
8774+
87758775
function contextualTypeIsNumericLiteralType(type: Type): boolean {
87768776
return !!(type.flags & TypeFlags.Union ? forEach((<UnionType>type).types, isNumericLiteralType) : isNumericLiteralType(type));
87778777
}

0 commit comments

Comments
 (0)