Enums with numbers do not render the correct `type` due to `reflection.type` being undefined
vladfrangu opened this issue · 9 comments
Hello!
I've recently deployed a website with your plugin, but I've encountered a strange issue with numeric enum members: https://discord-api-types.dev/api/next/discord-api-types-v10/enum/ActivityFlags#Embedded
The source code for the website is visible at https://github.com/discordjs/discord-api-types, in the website
folder
For some reason, reflection.type
is undefined in this case. Could it be an issue with the JSON I made? Is there an easy fix for this?
Thanks!
@vladfrangu Are you expecting the actual bitwise to be rendered, like 1 << 6
?
@vladfrangu Recreated this and it looks like the raw JSON data just has the number above.
I'd report this to TypeDoc. Not much I can do here, especially since there's no other metadata/flags to work with.
Thanks! I'll create a minimum repro sample and report it to them, and keep the patch I have for now to render the defaultValue if missing
🎉 whenever 0.23 is released this will be fixable TypeStrong/typedoc@261b5a1
Awesome, that was fast.
Actually just noticed this has been released in 0.22.16! I guess this issue can be closed since no release is needed from your side, correct?
Hmm...I tried a clean reinstall of the plugin but it still doesn't seem to render correctly, even if the JSON is correct 🤔
Scratch that, was looking at previous versions!
v2.1 is now on TypeDoc v0.23, which should include this fix!