UNPKG

docusaurus-plugin-typedoc-api

Version:

Docusaurus plugin that provides source code API documentation powered by TypeDoc.

40 lines (36 loc) 1.3 kB
'use strict'; const Comment = require('./Comment.js'); const DefaultValue = require('./DefaultValue.js'); const Type = require('./Type.js'); const jsxRuntime = require('react/jsx-runtime'); // https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/typeParameters.hbs function TypeParameters({ params }) { if (!params || params.length === 0) { return null; } return /*#__PURE__*/jsxRuntime.jsx("ul", { className: "tsd-type-parameters", children: params.map(param => /*#__PURE__*/jsxRuntime.jsxs("li", { children: [/*#__PURE__*/jsxRuntime.jsx("strong", { children: param.name }), param.type && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [/*#__PURE__*/jsxRuntime.jsx("span", { className: "tsd-signature-symbol", children: ":" }), " ", /*#__PURE__*/jsxRuntime.jsx(Type.Type, { type: param.type })] }), /*#__PURE__*/jsxRuntime.jsx(DefaultValue.DefaultValue, { comment: param.comment, type: param.type, value: param.default }), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, { comment: param.comment })] }, param.id)) }); } exports.TypeParameters = TypeParameters; //# sourceMappingURL=TypeParameters.js.map