typedoc-plugin-markdown
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -6,3 +6,3 @@ "use strict"; | ||
function type() { | ||
if (this instanceof types_1.ReferenceType && this.reflection) { | ||
if (this instanceof types_1.ReferenceType && (this.reflection || this.name)) { | ||
return getReferenceType(this); | ||
@@ -31,9 +31,11 @@ } | ||
} | ||
return `\`${this}\``; | ||
return this; | ||
} | ||
exports.type = type; | ||
function getReferenceType(model) { | ||
const reflection = [`[${model.reflection.name}](${relative_url_1.relativeUrl(model.reflection.url)})`]; | ||
const reflection = model.reflection | ||
? [`[${model.reflection.name}](${relative_url_1.relativeUrl(model.reflection.url)})`] | ||
: [model.name]; | ||
if (model.typeArguments) { | ||
reflection.push(`‹${model.typeArguments.map(typeArgument => `*${type.call(typeArgument)}*`).join(', ')}›`); | ||
reflection.push(`‹${model.typeArguments.map(typeArgument => `${type.call(typeArgument)}`).join(', ')}›`); | ||
} | ||
@@ -40,0 +42,0 @@ return reflection.join(''); |
{ | ||
"name": "typedoc-plugin-markdown", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
60640
1288