0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

chore: remove unreachable code to pass linter (#7270)

This commit is contained in:
Yusuke Tanaka 2020-08-31 18:10:28 +09:00 committed by GitHub
parent d761246e16
commit 7799b797d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 18 deletions

View file

@ -720,9 +720,8 @@ unitTest(function consoleTestWithCustomInspector(): void {
unitTest(function consoleTestWithCustomInspectorError(): void {
class A {
[customInspect](): string {
[customInspect](): never {
throw new Error("BOOM");
return "b";
}
}

View file

@ -319,53 +319,37 @@ class Printf {
switch (this.verb) {
case "t":
return this.pad(arg.toString());
break;
case "b":
return this.fmtNumber(arg as number, 2);
break;
case "c":
return this.fmtNumberCodePoint(arg as number);
break;
case "d":
return this.fmtNumber(arg as number, 10);
break;
case "o":
return this.fmtNumber(arg as number, 8);
break;
case "x":
return this.fmtHex(arg);
break;
case "X":
return this.fmtHex(arg, true);
break;
case "e":
return this.fmtFloatE(arg as number);
break;
case "E":
return this.fmtFloatE(arg as number, true);
break;
case "f":
case "F":
return this.fmtFloatF(arg as number);
break;
case "g":
return this.fmtFloatG(arg as number);
break;
case "G":
return this.fmtFloatG(arg as number, true);
break;
case "s":
return this.fmtString(arg as string);
break;
case "T":
return this.fmtString(typeof arg);
break;
case "v":
return this.fmtV(arg);
break;
case "j":
return this.fmtJ(arg);
break;
default:
return `%!(BAD VERB '${this.verb}')`;
}