Register @flag/@endflags as recognized TypeDoc block tags

Silences the "unknown block tag" warning TypeDoc logged for every
@flag/@endflags use, since it didn't recognize them.

--blockTags replaces TypeDoc's whole default list rather than appending,
so we read the defaults at runtime and re-pass them alongside our two
custom tags.
This commit is contained in:
Robert Hill 2026-08-27 23:42:56 -04:00
parent fea4865033
commit 0b6492bd85

View file

@ -8,6 +8,16 @@ if revision=$(git rev-parse HEAD 2>/dev/null); then
else
set -- --disableSources
fi
blockTags=$(node -e '
import("typedoc").then(async ({ Application }) => {
const app = await Application.bootstrap({})
const tags = app.options.getValue("blockTags").filter(t => t !== "@inheritDoc")
console.log([...tags, "@flag", "@endflags"].join(" "))
})
')
for tag in $blockTags; do
set -- "$@" --blockTags "$tag"
done
"$(yarn bin)/typedoc" --plugin ./scripts/typedoc-theme.mjs \
--theme tridactyl --router tridactyl \
"$@" \