Skip to content

Commit 7c04465

Browse files
Fixed help text
1 parent 723ffa4 commit 7c04465

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

bin/typedoc.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ var td;
234234
name: "json",
235235
type: "string",
236236
scope: 0 /* TypeDoc */,
237-
paramType: ts.Diagnostics.DIRECTORY,
237+
paramType: ts.Diagnostics.FILE,
238238
description: {
239239
key: 'Specifies the location and file name a json file describing the project is written to.',
240240
category: 2 /* Message */,
@@ -846,10 +846,18 @@ var td;
846846
}
847847
function getParamType(option) {
848848
if (option.paramType !== undefined) {
849-
return " " + option.paramType;
849+
return " " + getDiagnosticText(option.paramType);
850850
}
851851
return "";
852852
}
853+
function getDiagnosticText(message) {
854+
var args = [];
855+
for (var _i = 1; _i < arguments.length; _i++) {
856+
args[_i - 1] = arguments[_i];
857+
}
858+
var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments);
859+
return diagnostic.messageText;
860+
}
853861
function makePadding(paddingLength) {
854862
return Array(paddingLength + 1).join(" ");
855863
}

src/td/Application.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,16 @@ module td
340340

341341
function getParamType(option:ts.CommandLineOption) {
342342
if (option.paramType !== undefined) {
343-
return " " + option.paramType;
343+
return " " + getDiagnosticText(option.paramType);
344344
}
345345
return "";
346346
}
347347

348+
function getDiagnosticText(message:ts.DiagnosticMessage, ...args: any[]): string {
349+
var diagnostic:ts.Diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments);
350+
return diagnostic.messageText;
351+
}
352+
348353
function makePadding(paddingLength: number): string {
349354
return Array(paddingLength + 1).join(" ");
350355
}

src/td/Settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module td
4949
name: "json",
5050
type: "string",
5151
scope: OptionScope.TypeDoc,
52-
paramType: ts.Diagnostics.DIRECTORY,
52+
paramType: ts.Diagnostics.FILE,
5353
description: {
5454
key: 'Specifies the location and file name a json file describing the project is written to.',
5555
category: ts.DiagnosticCategory.Message,

0 commit comments

Comments
 (0)