Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedoc-plugin-markdown

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-markdown - npm Package Compare versions

Comparing version 4.0.0-next.39 to 4.0.0-next.40

1

dist/index.d.ts
/**
* Exposes the public API of the plugin
*/
export * from './options/maps';
export { PluginOptions } from './options/models';

@@ -5,0 +6,0 @@ export { load } from './plugin/bootstrap';

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MarkdownThemeRenderContext = exports.MarkdownTheme = exports.MarkdownRendererEvent = exports.MarkdownPageEvent = exports.load = void 0;
/**
* Exposes the public API of the plugin
*/
__exportStar(require("./options/maps"), exports);
var bootstrap_1 = require("./plugin/bootstrap");

@@ -5,0 +23,0 @@ Object.defineProperty(exports, "load", { enumerable: true, get: function () { return bootstrap_1.load; } });

64

dist/options/declarations.d.ts

@@ -79,2 +79,4 @@ import { DeclarationOption } from 'typedoc';

/**
* @deprecated In-page TOC is now hidden as default.
*
* @category UI

@@ -101,27 +103,2 @@ */

/**
* This option enables changing static text rendered to the documentation.
* Useful if an alternative English phrase is preferred or to translate English text to another language.
* This option does not attempt to address translating text within code comments.
*
* **Placeholders**
*
* Default values within curly braces `{}` indicates a placeholder of dynamic text.
* The `{version}` placeholder requires the TypeDoc option [`includeVersion`](https://typedoc.org/options/input/#includeversion) to be true.
*
* **keys**
*
* Keys are categorised with the following namespace conventions:
*
* - `header.*` defines text in the page header (if displayed).
* - `breadcrumbs.*` defines breadcrumbs in page header (if displayed).
* - `title.*` defines text in main page titles.
* - `label.*` other text in page content, including headings and table headers.
* - `kind.*` defines text mappings to TypeDoc's `ReflectionKind` definitions.
*
* Only keys that require translation need to be added to the object.
*
* @category UI
*/
export declare const textContentMappings: Partial<DeclarationOption>;
/**
* By default members are grouped by kind (eg Classes, Functions etc).

@@ -192,2 +169,27 @@ *

/**
* This option enables changing static text rendered to the documentation.
* Useful if an alternative English phrase is preferred or to translate English text to another language.
* This option does not attempt to address translating text within code comments.
*
* **Placeholders**
*
* Default values within curly braces `{}` indicates a placeholder of dynamic text.
* The `{version}` placeholder requires the TypeDoc option [`includeVersion`](https://typedoc.org/options/input/#includeversion) to be true.
*
* **keys**
*
* Keys are categorised with the following namespace conventions:
*
* - `header.*` defines text in the page header (if displayed).
* - `breadcrumbs.*` defines breadcrumbs in page header (if displayed).
* - `title.*` defines text in main page titles.
* - `label.*` other text in page content, including headings and table headers.
* - `kind.*` defines text mappings to TypeDoc's `ReflectionKind` definitions.
*
* Only keys that require translation need to be added to the object.
*
* @category UI
*/
export declare const textContentMappings: Partial<DeclarationOption>;
/**
* If undefined all urls will be relative.

@@ -217,15 +219,9 @@ *

/**
* This option should be used if there are issues with anchoring to symbols within a page.
*
* There are two flags exposed by this option:
* - For markdown parsers that do not automatically assign header ids.
* - When cross referencing symbols that are referenced in a table row.
*
* @headings
*
* Add HTML named anchors to headings for implementations that do not assign header ids.
*
* @tableRows
*
* Add HTML named anchors to table rows when table format options are selected.
*
* @category Utility
*/
export declare const namedAnchors: Partial<DeclarationOption>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.namedAnchors = exports.anchorPrefix = exports.preserveAnchorCasing = exports.publicPath = exports.indexFormat = exports.typeDeclarationFormat = exports.enumMembersFormat = exports.propertiesFormat = exports.parametersFormat = exports.expandObjects = exports.useCodeBlocks = exports.excludeGroups = exports.textContentMappings = exports.memberPageTitle = exports.indexPageTitle = exports.hideInPageTOC = exports.hideBreadcrumbs = exports.hidePageTitle = exports.hidePageHeader = exports.mergeReadme = exports.entryModule = exports.entryFileName = exports.outputFileStrategy = void 0;
exports.namedAnchors = exports.anchorPrefix = exports.preserveAnchorCasing = exports.publicPath = exports.textContentMappings = exports.indexFormat = exports.typeDeclarationFormat = exports.enumMembersFormat = exports.propertiesFormat = exports.parametersFormat = exports.expandObjects = exports.useCodeBlocks = exports.excludeGroups = exports.memberPageTitle = exports.indexPageTitle = exports.hideInPageTOC = exports.hideBreadcrumbs = exports.hidePageTitle = exports.hidePageHeader = exports.mergeReadme = exports.entryModule = exports.entryFileName = exports.outputFileStrategy = void 0;
const typedoc_1 = require("typedoc");

@@ -128,2 +128,4 @@ const maps_1 = require("./maps");

/**
* @deprecated In-page TOC is now hidden as default.
*
* @category UI

@@ -162,41 +164,2 @@ */

/**
* This option enables changing static text rendered to the documentation.
* Useful if an alternative English phrase is preferred or to translate English text to another language.
* This option does not attempt to address translating text within code comments.
*
* **Placeholders**
*
* Default values within curly braces `{}` indicates a placeholder of dynamic text.
* The `{version}` placeholder requires the TypeDoc option [`includeVersion`](https://typedoc.org/options/input/#includeversion) to be true.
*
* **keys**
*
* Keys are categorised with the following namespace conventions:
*
* - `header.*` defines text in the page header (if displayed).
* - `breadcrumbs.*` defines breadcrumbs in page header (if displayed).
* - `title.*` defines text in main page titles.
* - `label.*` other text in page content, including headings and table headers.
* - `kind.*` defines text mappings to TypeDoc's `ReflectionKind` definitions.
*
* Only keys that require translation need to be added to the object.
*
* @category UI
*/
exports.textContentMappings = {
help: 'Provides a mechanism to change the content of text used in documentation.',
type: typedoc_1.ParameterType.Mixed,
defaultValue: maps_1.StaticText,
validate(value) {
if (!value || typeof value !== 'object') {
throw new Error('textContentMappings must be an object.');
}
for (const val of Object.values(value)) {
if (typeof val !== 'string') {
throw new Error(`All values of textContentMappings must be strings.`);
}
}
},
};
/**
* By default members are grouped by kind (eg Classes, Functions etc).

@@ -304,2 +267,41 @@ *

/**
* This option enables changing static text rendered to the documentation.
* Useful if an alternative English phrase is preferred or to translate English text to another language.
* This option does not attempt to address translating text within code comments.
*
* **Placeholders**
*
* Default values within curly braces `{}` indicates a placeholder of dynamic text.
* The `{version}` placeholder requires the TypeDoc option [`includeVersion`](https://typedoc.org/options/input/#includeversion) to be true.
*
* **keys**
*
* Keys are categorised with the following namespace conventions:
*
* - `header.*` defines text in the page header (if displayed).
* - `breadcrumbs.*` defines breadcrumbs in page header (if displayed).
* - `title.*` defines text in main page titles.
* - `label.*` other text in page content, including headings and table headers.
* - `kind.*` defines text mappings to TypeDoc's `ReflectionKind` definitions.
*
* Only keys that require translation need to be added to the object.
*
* @category UI
*/
exports.textContentMappings = {
help: 'Provides a mechanism to change the content of text used in documentation.',
type: typedoc_1.ParameterType.Mixed,
defaultValue: maps_1.StaticText,
validate(value) {
if (!value || typeof value !== 'object') {
throw new Error('textContentMappings must be an object.');
}
for (const val of Object.values(value)) {
if (typeof val !== 'string') {
throw new Error(`All values of textContentMappings must be strings.`);
}
}
},
};
/**
* If undefined all urls will be relative.

@@ -341,22 +343,13 @@ *

/**
* This option should be used if there are issues with anchoring to symbols within a page.
*
* There are two flags exposed by this option:
* - For markdown parsers that do not automatically assign header ids.
* - When cross referencing symbols that are referenced in a table row.
*
* @headings
*
* Add HTML named anchors to headings for implementations that do not assign header ids.
*
* @tableRows
*
* Add HTML named anchors to table rows when table format options are selected.
*
* @category Utility
*/
exports.namedAnchors = {
help: 'Flags to specifify where HTML named anchor tags should be used for internal anchor links.',
type: typedoc_1.ParameterType.Flags,
defaults: {
headings: false,
tableRows: false,
},
help: 'Add HTML named anchors to headings and table rows.',
type: typedoc_1.ParameterType.Boolean,
defaultValue: false,
};

@@ -29,3 +29,3 @@ /**

'title.memberPage': string;
'label.contents': string;
'title.member': string;
'label.defaultValue': string;

@@ -32,0 +32,0 @@ 'label.description': string;

@@ -31,6 +31,6 @@ "use strict";

'title.memberPage': '{kind}: {name}',
'label.contents': 'Contents',
'title.member': '{name}',
'label.defaultValue': 'Default value',
'label.description': 'Description',
'label.extendedBy': 'Extended By',
'label.extendedBy': 'Extended by',
'label.extends': 'Extends',

@@ -37,0 +37,0 @@ 'label.implements': 'Implements',

@@ -14,3 +14,2 @@ import { ManuallyValidatedOption } from 'typedoc';

memberPageTitle: string;
textContentMappings: ManuallyValidatedOption<TextContentMappings>;
excludeGroups: boolean;

@@ -24,6 +23,7 @@ useCodeBlocks: boolean;

indexFormat: 'list' | 'table';
textContentMappings: ManuallyValidatedOption<TextContentMappings>;
publicPath: string;
preserveAnchorCasing: boolean;
anchorPrefix: string;
namedAnchors: Record<string, boolean>;
namedAnchors: boolean;
}

@@ -42,3 +42,2 @@ }

memberPageTitle: string;
textContentMappings: ManuallyValidatedOption<TextContentMappings>;
excludeGroups: boolean;

@@ -52,6 +51,7 @@ useCodeBlocks: boolean;

indexFormat: 'list' | 'table';
textContentMappings: ManuallyValidatedOption<TextContentMappings>;
publicPath: string;
preserveAnchorCasing: boolean;
anchorPrefix: string;
namedAnchors: Record<string, boolean>;
namedAnchors: boolean;
}

@@ -66,3 +66,3 @@ export interface TextContentMappings {

'title.memberPage': string;
'label.contents': string;
'title.member': string;
'label.defaultValue': string;

@@ -95,4 +95,4 @@ 'label.description': string;

'kind.enum.plural': string;
'kind.enum-member.singular': string;
'kind.enum-member.plural': string;
'kind.enumMember.singular': string;
'kind.enumMember.plural': string;
'kind.event.singular': string;

@@ -118,6 +118,6 @@ 'kind.event.plural': string;

'kind.reference.plural': string;
'kind.type-alias.singular': string;
'kind.type-alias.plural': string;
'kind.type-parameter.singular': string;
'kind.type-parameter.plural': string;
'kind.typeAlias.singular': string;
'kind.typeAlias.plural': string;
'kind.typeParameter.singular': string;
'kind.typeParameter.plural': string;
}

@@ -11,4 +11,4 @@ "use strict";

'kind.enum.plural': 'Enumerations',
'kind.enum-member.singular': 'Enumeration Member',
'kind.enum-member.plural': 'Enumeration Members',
'kind.enumMember.singular': 'Enumeration Member',
'kind.enumMember.plural': 'Enumeration Members',
'kind.event.singular': 'Event',

@@ -34,6 +34,6 @@ 'kind.event.plural': 'Events',

'kind.reference.plural': 'References',
'kind.type-alias.singular': 'Type alias',
'kind.type-alias.plural': 'Type Aliases',
'kind.type-parameter.singular': 'Type parameter',
'kind.type-parameter.plural': 'Type parameters',
'kind.typeAlias.singular': 'Type alias',
'kind.typeAlias.plural': 'Type Aliases',
'kind.typeParameter.singular': 'Type parameter',
'kind.typeParameter.plural': 'Type parameters',
};

@@ -44,3 +44,3 @@ exports.SINGULAR_KIND_KEY_MAP = {

['Enumeration']: 'kind.enum.singular',
['Enumeration Member']: 'kind.enum-member.singular',
['Enumeration Member']: 'kind.enumMember.singular',
['Event']: 'kind.event.singular',

@@ -56,4 +56,4 @@ ['Function']: 'kind.function.singular',

['Reference']: 'kind.reference.singular',
['Type alias']: 'kind.type-alias.singular',
['Type parameter']: 'kind.type-parameter.singular',
['Type alias']: 'kind.typeAlias.singular',
['Type parameter']: 'kind.typeParameter.singular',
};

@@ -64,3 +64,3 @@ exports.PLURAL_KIND_KEY_MAP = {

['Enumerations']: 'kind.enum.plural',
['Enumeration Members']: 'kind.enum-member.plural',
['Enumeration Members']: 'kind.enumMember.plural',
['Events']: 'kind.event.plural',

@@ -76,4 +76,4 @@ ['Functions']: 'kind.function.plural',

['References']: 'kind.reference.plural',
['Type Aliases']: 'kind.type-alias.plural',
['Type parameters']: 'kind.type-parameter.plural',
['Type Aliases']: 'kind.typeAlias.plural',
['Type parameters']: 'kind.typeParameter.plural',
};

@@ -12,3 +12,2 @@ /**

export declare function isAbsoluteIndex(reflection: DeclarationReflection | ProjectReflection): boolean | undefined;
export declare function hasToc(reflection: DeclarationReflection, isMembers: boolean): boolean | undefined;
export declare function isGroupKind(reflection: DeclarationReflection | SignatureReflection): boolean;

@@ -24,6 +23,4 @@ export declare function getModifier(reflection: DeclarationReflection): "private" | "public" | "readonly" | "protected" | "static" | "abstract" | "get" | "set" | null;

export declare function getMemberTitle(reflection: DeclarationReflection): string;
export declare function declarationHasParent(declaration: DeclarationReflection): boolean | undefined;
export declare function flattenDeclarations(props: DeclarationReflection[], includeSignatures?: boolean): any[];
export declare function getSignatureParameters(parameters: ParameterReflection[], format?: boolean): string;
export declare function getIndexFileName(reflection: ProjectReflection | DeclarationReflection, isPackages?: boolean): "packages.md" | "modules.md" | "globals.md";
export declare function getIndexLabel(reflection: ProjectReflection | DeclarationReflection, isPackages?: boolean): "Modules" | "Packages" | "Globals";

@@ -9,3 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getIndexLabel = exports.getIndexFileName = exports.getSignatureParameters = exports.flattenDeclarations = exports.declarationHasParent = exports.getMemberTitle = exports.KEYWORD_MAP = exports.getModifier = exports.isGroupKind = exports.hasToc = exports.isAbsoluteIndex = exports.hasIndex = exports.getProjectDisplayName = exports.getDeclarationType = void 0;
exports.getIndexFileName = exports.getSignatureParameters = exports.flattenDeclarations = exports.getMemberTitle = exports.KEYWORD_MAP = exports.getModifier = exports.isGroupKind = exports.isAbsoluteIndex = exports.hasIndex = exports.getProjectDisplayName = exports.getDeclarationType = void 0;
const typedoc_1 = require("typedoc");

@@ -44,20 +44,4 @@ const elements_1 = require("../support/elements");

exports.isAbsoluteIndex = isAbsoluteIndex;
function hasToc(reflection, isMembers) {
var _a;
return ((reflection.kindOf([
typedoc_1.ReflectionKind.Project,
typedoc_1.ReflectionKind.Module,
typedoc_1.ReflectionKind.Namespace,
]) ||
(reflection.kindOf([
typedoc_1.ReflectionKind.Enum,
typedoc_1.ReflectionKind.Class,
typedoc_1.ReflectionKind.Interface,
]) &&
isMembers)) &&
((_a = reflection.groups) === null || _a === void 0 ? void 0 : _a.some((group) => !group.allChildrenHaveOwnDocument())));
}
exports.hasToc = hasToc;
function isGroupKind(reflection) {
return reflection.kindOf([
const groupKinds = [
typedoc_1.ReflectionKind.Class,

@@ -69,3 +53,4 @@ typedoc_1.ReflectionKind.Interface,

typedoc_1.ReflectionKind.TypeAlias,
]);
];
return groupKinds.includes(reflection.kind);
}

@@ -142,10 +127,2 @@ exports.isGroupKind = isGroupKind;

exports.getMemberTitle = getMemberTitle;
function declarationHasParent(declaration) {
var _a, _b;
return (_b = (_a = declaration === null || declaration === void 0 ? void 0 : declaration.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.kindOf([
typedoc_1.ReflectionKind.Property,
typedoc_1.ReflectionKind.CallSignature,
]);
}
exports.declarationHasParent = declarationHasParent;
function flattenDeclarations(props, includeSignatures = false) {

@@ -235,10 +212,1 @@ const flattenDeclarations = (current) => {

exports.getIndexFileName = getIndexFileName;
function getIndexLabel(reflection, isPackages = false) {
var _a;
if (isPackages) {
return 'Packages';
}
const isModules = (_a = reflection.children) === null || _a === void 0 ? void 0 : _a.every((child) => child.kindOf(typedoc_1.ReflectionKind.Module));
return isModules ? 'Modules' : 'Globals';
}
exports.getIndexLabel = getIndexLabel;

@@ -29,3 +29,2 @@ "use strict";

const typedoc_1 = require("typedoc");
const maps_1 = require("../../../options/maps");
const elements_1 = require("../../../support/elements");

@@ -57,10 +56,4 @@ const utils_1 = require("../../../support/utils");

}
if (!context.options.getValue('hideInPageTOC') &&
(0, helpers_1.hasToc)(page.model, context.options.getValue('outputFileStrategy') ===
maps_1.OutputFileStrategy.Members)) {
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('label.contents')));
md.push(context.reflectionIndex(page.model, true, headingLevel + 1));
}
return md.join('\n\n');
}
exports.pageIndex = pageIndex;

@@ -30,3 +30,3 @@ "use strict";

if (declaration.type.typeArguments[0] instanceof typedoc_1.ReflectionType) {
md.push((0, elements_1.heading)(headingLevel, 'Type declaration'));
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('label.typeDeclaration')));
md.push(context.typeDeclarationMember(declaration.type.typeArguments[0].declaration, headingLevel));

@@ -36,3 +36,3 @@ }

if (declaration.typeParameters) {
md.push((0, elements_1.heading)(headingLevel, 'Type parameters'));
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('kind.typeParameter.plural')));
if (context.options.getValue('parametersFormat') === 'table') {

@@ -47,3 +47,3 @@ md.push(context.typeParametersTable(declaration.typeParameters));

if (typeDeclaration === null || typeDeclaration === void 0 ? void 0 : typeDeclaration.indexSignature) {
md.push((0, elements_1.heading)(headingLevel, `Index signature`));
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('label.indexSignature')));
md.push(context.indexSignatureTitle(typeDeclaration.indexSignature));

@@ -50,0 +50,0 @@ }

@@ -12,5 +12,4 @@ "use strict";

function member(context, reflection, headingLevel, nested = false) {
var _a;
const md = [];
if ((_a = context.options.getValue('namedAnchors')) === null || _a === void 0 ? void 0 : _a.headings) {
if (context.options.getValue('namedAnchors')) {
md.push(`<a id="${reflection.anchor}" name="${reflection.anchor}"></a>`);

@@ -20,3 +19,8 @@ }

!(reflection.kind === typedoc_1.ReflectionKind.Constructor)) {
md.push((0, elements_1.heading)(headingLevel, (0, helpers_1.getMemberTitle)(reflection)));
const memberName = (0, helpers_1.getMemberTitle)(reflection);
const memberHeading = context
.getTextContent('title.member')
.replace('{name}', memberName)
.replace('{kind}', context.kindString(reflection.kind));
md.push((0, elements_1.heading)(headingLevel, memberHeading));
}

@@ -23,0 +27,0 @@ const getMember = (reflection) => {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.reflectionMember = void 0;
const maps_1 = require("../../../options/maps");
const elements_1 = require("../../../support/elements");

@@ -20,3 +19,3 @@ const helpers_1 = require("../../helpers");

if (reflection.typeParameters) {
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('kind.type-parameter.plural')));
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('kind.typeParameter.plural')));
if (context.options.getValue('parametersFormat') === 'table') {

@@ -49,11 +48,2 @@ md.push(context.typeParametersTable(reflection.typeParameters));

}
if (!context.options.getValue('hideInPageTOC') &&
(0, helpers_1.hasToc)(reflection, context.options.getValue('outputFileStrategy') ===
maps_1.OutputFileStrategy.Members)) {
const tocContent = context.reflectionIndex(reflection, true, headingLevel + 1);
if (tocContent.length) {
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('label.contents')));
md.push(context.reflectionIndex(reflection, true, headingLevel + 1));
}
}
md.push(context.members(reflection, headingLevel));

@@ -60,0 +50,0 @@ return md.join('\n\n');

@@ -22,3 +22,3 @@ "use strict";

!signature.kindOf(typedoc_1.ReflectionKind.ConstructorSignature)) {
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('kind.type-parameter.plural')));
md.push((0, elements_1.heading)(headingLevel, context.getTextContent('kind.typeParameter.plural')));
if (context.options.getValue('parametersFormat') === 'table') {

@@ -25,0 +25,0 @@ md.push(context.typeParametersTable(signature.typeParameters));

@@ -15,3 +15,3 @@ "use strict";

const headers = [
context.getTextContent('kind.enum-member.singular'),
context.getTextContent('kind.enumMember.singular'),
context.getTextContent('label.value'),

@@ -23,8 +23,6 @@ ];

const rows = props.map((property) => {
var _a;
const propertyType = (0, helpers_1.getDeclarationType)(property);
const row = [];
const nameColumn = [];
if (((_a = context.options.getValue('namedAnchors')) === null || _a === void 0 ? void 0 : _a.tableRows) &&
property.anchor) {
if (context.options.getValue('namedAnchors') && property.anchor) {
nameColumn.push(`<a id="${property.anchor}" name="${property.anchor}"></a>`);

@@ -31,0 +29,0 @@ }

@@ -36,3 +36,3 @@ "use strict";

declarations.forEach((property, index) => {
var _a, _b, _c, _d, _e;
var _a, _b, _c, _d;
const propertyType = (0, helpers_1.getDeclarationType)(property);

@@ -44,4 +44,3 @@ const row = [];

const nameColumn = [];
if (((_a = context.options.getValue('namedAnchors')) === null || _a === void 0 ? void 0 : _a.tableRows) &&
property.anchor) {
if (context.options.getValue('namedAnchors') && property.anchor) {
nameColumn.push(`<a id="${property.anchor}" name="${property.anchor}"></a>`);

@@ -61,4 +60,4 @@ }

if (hasComments) {
const hasComment = ((_c = (_b = property.comment) === null || _b === void 0 ? void 0 : _b.blockTags) === null || _c === void 0 ? void 0 : _c.length) ||
((_e = (_d = property === null || property === void 0 ? void 0 : property.comment) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.length);
const hasComment = ((_b = (_a = property.comment) === null || _a === void 0 ? void 0 : _a.blockTags) === null || _b === void 0 ? void 0 : _b.length) ||
((_d = (_c = property === null || property === void 0 ? void 0 : property.comment) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.length);
const comments = property === null || property === void 0 ? void 0 : property.comment;

@@ -65,0 +64,0 @@ if (hasComment && comments) {

@@ -12,3 +12,3 @@ "use strict";

const hasComments = typeParameters.some((typeParameter) => Boolean(typeParameter.comment));
const headers = [context.getTextContent('kind.type-parameter.singular')];
const headers = [context.getTextContent('kind.typeParameter.singular')];
if (hasDefault) {

@@ -15,0 +15,0 @@ headers.push(context.getTextContent('label.value'));

@@ -16,15 +16,14 @@ "use strict";

}
const includeReadme = context.options.getValue('mergeReadme') && page.model.readme;
const headingLevel = includeReadme ? 2 : 1;
const includeReadme = context.options.getValue('mergeReadme') && Boolean(page.model.readme);
if (includeReadme && page.model.readme) {
md.push(context.commentParts(page.model.readme));
}
if (!context.options.getValue('hidePageTitle')) {
md.push((0, elements_1.heading)(headingLevel, context.pageTitle(page)));
if (!context.options.getValue('hidePageTitle') && !includeReadme) {
md.push((0, elements_1.heading)(1, context.pageTitle(page)));
}
if (page.model.comment) {
md.push(context.comment(page.model.comment, headingLevel + 1));
md.push(context.comment(page.model.comment, 2));
}
md.push(context.pageIndex(page, headingLevel + 1));
md.push(context.members(page.model, headingLevel + 1));
md.push(context.pageIndex(page, 2));
md.push(context.members(page.model, 2));
md.push(context.footer());

@@ -31,0 +30,0 @@ return md.join('\n\n');

@@ -36,6 +36,10 @@ "use strict";

// DEPRECATED PROPS WARNING (to delete)
const deprecatedOptions = ['indexPageTitle', 'memberPageTitle'];
const deprecatedOptions = [
'indexPageTitle',
'memberPageTitle',
'hideInPageTOC',
];
deprecatedOptions.forEach((option) => {
if (this.application.options.isSet(option)) {
this.application.logger.warn(`[typedoc-plugin-markdown] "${option}" is deprecated. Please see https://www.typedoc-plugin-markdown.org/options#${option.toLowerCase()}`);
this.application.logger.warn(`[typedoc-plugin-markdown] "${option}" is deprecated and will be removed in v4 release. Please see https://www.typedoc-plugin-markdown.org/options#${option.toLowerCase()}`);
}

@@ -42,0 +46,0 @@ });

@@ -232,4 +232,3 @@ "use strict";

getAnchorName(reflection) {
const htmlTableAnchors = this.options.getValue('namedAnchors') &&
this.options.getValue('namedAnchors')['tableRows'];
const htmlTableAnchors = this.options.getValue('namedAnchors');
if (!htmlTableAnchors) {

@@ -236,0 +235,0 @@ if ((reflection.kindOf(typedoc_1.ReflectionKind.Property) &&

{
"name": "typedoc-plugin-markdown",
"version": "4.0.0-next.39",
"version": "4.0.0-next.40",
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.",

@@ -20,4 +20,3 @@ "main": "dist/index.js",

"build-and-run": "npm run build && npm run pretest",
"build-and-test": "npm run build && npm run test",
"api-docs": "npm run build && typedoc --options ./typedoc.api.js --out ./docs/api"
"build-and-test": "npm run build && npm run test"
},

@@ -24,0 +23,0 @@ "author": "Thomas Grey",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc