Skip to content

Commit d69f2b0

Browse files
committed
fix: lint error
1 parent 530c395 commit d69f2b0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/compiler/checker.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1062,11 +1062,8 @@ namespace ts {
10621062
function errorByThrowType(location: Node | undefined, type: Type) {
10631063
if (type.flags & TypeFlags.ThrowType) type = (<ThrowType>type).value;
10641064
let message = "";
1065-
if (type.flags & TypeFlags.StringLiteral) {
1066-
message = (<StringLiteralType>type).value;
1067-
} else {
1068-
message = getTypeNameForErrorDisplay(type)
1069-
};
1065+
if (type.flags & TypeFlags.StringLiteral) message = (<StringLiteralType>type).value;
1066+
else message = getTypeNameForErrorDisplay(type);
10701067
error(location, Diagnostics.Type_instantiated_results_in_a_throw_type_saying_Colon_0, message);
10711068
}
10721069

0 commit comments

Comments
 (0)