UNPKG

igniteui-typedoc-theme

Version:
42 lines (41 loc) 3.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reflectionTemplate = void 0; const typedoc_1 = require("typedoc"); const typedoc_2 = require("typedoc"); const lib_1 = require("../utils/lib"); const reflectionTemplate = (context, props) => { var _a; return (typedoc_2.JSX.createElement(typedoc_2.JSX.Fragment, null, props.model.hasComment() && typedoc_2.JSX.createElement("section", { class: "tsd-panel tsd-comment" }, context.comment(props.model)), (0, lib_1.hasTypeParameters)(props.model) && (typedoc_2.JSX.createElement("section", { class: "tsd-panel tsd-type-parameters" }, context.typeParameters(props.model.typeParameters))), props.model instanceof typedoc_1.DeclarationReflection && (typedoc_2.JSX.createElement(typedoc_2.JSX.Fragment, null, !!props.model.typeHierarchy && (typedoc_2.JSX.createElement("section", { class: "tsd-panel tsd-hierarchy" }, typedoc_2.JSX.createElement("h3", null, "Hierarchy"), context.hierarchy(props.model.typeHierarchy))), !!props.model.implementedTypes && (typedoc_2.JSX.createElement("section", { class: "tsd-panel" }, typedoc_2.JSX.createElement("h3", null, "Implements"), typedoc_2.JSX.createElement("ul", { class: "tsd-hierarchy" }, props.model.implementedTypes.map((item) => (typedoc_2.JSX.createElement("li", null, context.type(item))))))), !!props.model.implementedBy && (typedoc_2.JSX.createElement("section", { class: "tsd-panel" }, typedoc_2.JSX.createElement("h3", null, "Implemented by"), typedoc_2.JSX.createElement("ul", { class: "tsd-hierarchy" }, props.model.implementedBy.map((item) => (typedoc_2.JSX.createElement("li", null, context.type(item))))))), !!props.model.signatures && (typedoc_2.JSX.createElement("section", { class: "tsd-panel" }, typedoc_2.JSX.createElement("h3", { class: "tsd-before-signature" }, "Callable"), context.memberSignatures(props.model))), !!props.model.indexSignature && (typedoc_2.JSX.createElement("section", { class: "tsd-panel " + props.model.cssClasses }, typedoc_2.JSX.createElement("h3", { class: "tsd-before-signature" }, "Indexable"), typedoc_2.JSX.createElement("div", { class: "tsd-signature tsd-kind-icon" }, typedoc_2.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["), props.model.indexSignature.parameters.map((item) => (typedoc_2.JSX.createElement(typedoc_2.JSX.Fragment, null, item.name, ": ", context.type(item.type)))), typedoc_2.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "), context.type(props.model.indexSignature.type)), context.comment(props.model.indexSignature), ((_a = props.model.indexSignature) === null || _a === void 0 ? void 0 : _a.type) instanceof typedoc_1.ReflectionType && context.parameter(props.model.indexSignature.type.declaration))))), context.index(props.model), context.members(props.model))); }; exports.reflectionTemplate = reflectionTemplate;