Skip to content

Commit bfecf5b

Browse files
authored
docs: fix link URLs to the reference documentation (#14308)
1 parent cb9a090 commit bfecf5b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
- lqze
235235
- lukerSpringTree
236236
- m-dad
237+
- m-kawafuji
237238
- m-shojaei
238239
- machour
239240
- majamarijan

scripts/docs.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ function processTypedocModule(
268268
? "variables"
269269
: undefined;
270270

271+
// Assigning an arrow function to a variable will be a "variable" here but
272+
// typedoc will classify it as a "function". We can identify these if they
273+
// define `@params` or `@returns` tags in their JSDoc.
274+
if (
275+
type === "variables" &&
276+
subChild.comment?.blockTags?.some(
277+
(tag) => tag.tag === "@param" || tag.tag === "@returns",
278+
)
279+
) {
280+
type = "functions";
281+
}
282+
271283
if (!type) {
272284
warn(
273285
`Skipping ${apiName} because it is not a function, class, enum, interface, or type`,

0 commit comments

Comments
 (0)