Skip to content

Commit 5e9b49f

Browse files
committed
chore(core): updated docs
1 parent f1a29b6 commit 5e9b49f

File tree

68 files changed

+855
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+855
-568
lines changed

.changeset/big-teachers-shave.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
- Implemented typedoc 0.27 compatibility support.
66
- Exposed "typeDeclarationVisibility" option to provide a compacted output structure (#703).
7-
- The "textContentMappings" option now accepts a string with placeholder or a function with arguments (#693, #715).
7+
- Exposed "pageTitleTemplates" option that accepts a string with placeholder or function arguments to control page titles. Should be used in favour of "textContentMapping" (#693, #715).

.changeset/chatty-cheetahs-love.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'typedoc-plugin-markdown': minor
33
---
44

5-
- Exposed formatting with prettier options (--formatWithPrettier and --prettierConfigFile).
5+
- Exposed formatting with prettier options "formatWithPrettier" and "prettierConfigFile" that enables additional formatting of output if Prettier is installed on a project.

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ on:
1616
jobs:
1717
lint-and-test:
1818
runs-on: ubuntu-latest
19+
timeout-minutes: 30
1920
strategy:
21+
fail-fast: false
2022
matrix:
2123
node: ['20']
24+
include:
25+
- retry: [1, 2, 3]
2226
name: Node ${{ matrix.node }}
2327
steps:
24-
- name: Set Swap Space
25-
uses: pierotofy/set-swap-space@master
26-
with:
27-
swap-size-gb: 10
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030
- name: Set up Node

devtools/packages/prebuild-options/tasks/generate-models.ts

+16-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ import { ManuallyValidatedOption } from 'typedoc'`);
6666
theme_default_value: [];
6767
theme_default_type: [];
6868
theme_description: [];
69-
theme_documentation: [];
7069
theme_event: [];
7170
theme_re_exports: [];
7271
theme_renames_and_re_exports: [];
@@ -134,7 +133,7 @@ ${name}: ${getType(name, option, true)};`,
134133
${Object.entries(option.defaultValue as any)
135134
.map(
136135
([key, value]) =>
137-
`'${key}'${value === undefined ? '?' : ''}: ${getValueType(value)}`,
136+
`'${key}'${value === undefined ? '?' : ''}: ${getValueType(key, value)}`,
138137
)
139138
.join(';')}
140139
}
@@ -161,7 +160,14 @@ function getComments(name: string) {
161160
return '';
162161
}
163162

164-
function getValueType(value: any) {
163+
function getValueType(key: string, value: any) {
164+
if (key === 'pageTitleTemplates') {
165+
return `{
166+
index: string | ((args: { name: string }) => string);
167+
member: string;
168+
module: string;
169+
}`;
170+
}
165171
if (value === true || value === false) {
166172
return 'boolean';
167173
}
@@ -179,6 +185,13 @@ function getType(
179185
option: Partial<DeclarationOption>,
180186
isInterface = false,
181187
) {
188+
if (name === 'pageTitleTemplates') {
189+
return `{
190+
index: string | ((name: { projectName: string; version: string }) => string);
191+
member: string | ((name: { name: string; kind: string; group: string }) => string);
192+
module: string | ((name: { name: string, kind: string }) => string);
193+
}`;
194+
}
182195
if (option.type === ParameterType.Array && option.defaultValue?.length) {
183196
return `(${option.defaultValue
184197
.toString()

devtools/typedoc-plugins/typedoc-default-values.js renamed to devtools/typedoc-plugins/typedoc-default-values.mjs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
const { Converter, TypeScript, CommentTag, Comment } = require('typedoc');
2-
const { ModifierFlags } = require('typescript');
1+
import { Comment, CommentTag, Converter, TypeScript } from 'typedoc';
32

4-
exports.load = function (app) {
3+
export function load(app) {
54
const printer = TypeScript.createPrinter({
65
removeComments: false,
76
omitTrailingSemicolon: true,
@@ -32,7 +31,7 @@ exports.load = function (app) {
3231

3332
reflection.defaultValue = '';
3433

35-
if (Boolean(reflection.comment)) {
34+
if (reflection.comment) {
3635
reflection.comment.blockTags = [
3736
...(reflection.comment.blockTags || []),
3837
getTag(defaultValue),
@@ -43,7 +42,7 @@ exports.load = function (app) {
4342
}
4443
},
4544
);
46-
};
45+
}
4746
function getTag(value) {
4847
return new CommentTag('@defaultValue', [
4948
{

devtools/typedoc-plugins/typedoc-symbols.mjs

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
// @ts-check
2+
3+
/**
4+
* Local plugin to tweak TypeDoc output for nextra docs
5+
*
6+
* @param {import("typedoc").Application} app
7+
*/
18
export function load(app) {
29
app.converter.addUnknownSymbolResolver((ref) => {
310
if (ref.moduleSource === 'typedoc') {
4-
const symbol = ref.symbolReference.path[0].path;
11+
const symbol =
12+
ref?.symbolReference?.path && ref?.symbolReference?.path[0].path;
513
const enums = ['ReflectionKind'];
614
const configuration = [
715
'DeclarationOption',
@@ -56,24 +64,28 @@ export function load(app) {
5664
'QueryType',
5765
];
5866

59-
if (models.includes(symbol)) {
60-
return `https://typedoc.org/api/classes/Models.${symbol}.html`;
61-
}
62-
if (classes.includes(symbol)) {
63-
return `https://typedoc.org/api/classes/${symbol}.html`;
64-
}
65-
if (enums.includes(symbol)) {
66-
return `https://typedoc.org/api/enums/Models.${symbol}-1.html`;
67-
}
68-
if (interfaces.includes(symbol)) {
69-
return `https://typedoc.org/api/${interfaces}/TypeDocOptions.html`;
70-
}
71-
if (configuration.includes(symbol)) {
72-
return `https://typedoc.org/api/types/Configuration.${symbol}.html`;
73-
}
74-
if (types.includes(symbol)) {
75-
return `https://typedoc.org/api/types/${symbol}.DeclarationOption.html`;
67+
if (symbol) {
68+
if (models.includes(symbol)) {
69+
return `https://typedoc.org/api/classes/Models.${symbol}.html`;
70+
}
71+
if (classes.includes(symbol)) {
72+
return `https://typedoc.org/api/classes/${symbol}.html`;
73+
}
74+
if (enums.includes(symbol)) {
75+
return `https://typedoc.org/api/enums/Models.${symbol}-1.html`;
76+
}
77+
if (interfaces.includes(symbol)) {
78+
return `https://typedoc.org/api/${interfaces}/TypeDocOptions.html`;
79+
}
80+
if (configuration.includes(symbol)) {
81+
return `https://typedoc.org/api/types/Configuration.${symbol}.html`;
82+
}
83+
if (types.includes(symbol)) {
84+
return `https://typedoc.org/api/types/${symbol}.DeclarationOption.html`;
85+
}
7686
}
87+
88+
return '';
7789
}
7890
});
7991
}

docs/pages/api-docs/Class.MarkdownPageEvent.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ The complete `string` filename where the file will be written..
5757

5858
***
5959

60+
### group?
61+
62+
> `optional` **group**: `string`
63+
64+
The group that the reflection belongs too
65+
66+
***
67+
6068
### contents?
6169

6270
> `optional` **contents**: `string`

0 commit comments

Comments
 (0)