Skip to content

Commit 5932883

Browse files
committed
output the -params.mdx and -return.mdx next to the source markdown for more robust script.
1 parent 4e09572 commit 5932883

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.typedoc/extract-returns-and-params.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ function replaceGenericTypesInParamsTable(content) {
6161
/**
6262
* Extracts the "## Parameters" section from a markdown file and writes it to a separate file.
6363
* @param {string} filePath - The path to the markdown file
64-
* @param {string} dirName - The directory containing the files
6564
* @returns {boolean} True if a file was created
6665
*/
67-
function extractParametersSection(filePath, dirName) {
66+
function extractParametersSection(filePath) {
6867
const content = fs.readFileSync(filePath, 'utf-8');
6968
const fileName = path.basename(filePath, '.mdx');
69+
const dirName = path.dirname(filePath);
7070

7171
// Always use -params suffix
7272
const suffix = '-params';
@@ -168,7 +168,7 @@ function main() {
168168
}
169169

170170
// Extract Parameters sections
171-
if (extractParametersSection(filePath, dir)) {
171+
if (extractParametersSection(filePath)) {
172172
paramsCount++;
173173
}
174174
}

0 commit comments

Comments
 (0)