We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 530c395 commit d69f2b0Copy full SHA for d69f2b0
src/compiler/checker.ts
@@ -1062,11 +1062,8 @@ namespace ts {
1062
function errorByThrowType(location: Node | undefined, type: Type) {
1063
if (type.flags & TypeFlags.ThrowType) type = (<ThrowType>type).value;
1064
let message = "";
1065
- if (type.flags & TypeFlags.StringLiteral) {
1066
- message = (<StringLiteralType>type).value;
1067
- } else {
1068
- message = getTypeNameForErrorDisplay(type)
1069
- };
+ if (type.flags & TypeFlags.StringLiteral) message = (<StringLiteralType>type).value;
+ else message = getTypeNameForErrorDisplay(type);
1070
error(location, Diagnostics.Type_instantiated_results_in_a_throw_type_saying_Colon_0, message);
1071
}
1072
0 commit comments