typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
714 stars 176 forks source link

Tried to set an option (noStandardTags)/(tagDefinitions) that was not declared #432

Closed sebastianwessel closed 1 year ago

sebastianwessel commented 1 year ago

I've the following issues in my mono repo when creating the typedoc documentation with markdown plugin.

Without the usage of this plugin, it generates the documentation as expected.

typedoc: 0.24.6 typedoc-monorepo-link-types: 0.0.4 typedoc-plugin-markdown: 3.15.3 typescript: 5.0.4

Node v18.15.0

[error] Tried to set an option (noStandardTags) that was not declared. You may have meant:
        inlineTags
        modifierTags
        options
        out
        blockTags
        sort
        json
        name
        htmlLang
[error] Tried to set an option (tagDefinitions) that was not declared. You may have meant:
        options
        emit
        navigation
        validation
        entryPoints
        markedOptions
        gitRevision
        titleLink
        version

After removal of "extends": ["typedoc/tsdoc.json"], in typedoc.json it worked

tgreyuk commented 1 year ago

Hi - sorry not sure what those options are - they must be declared by another plugin?

sebastianwessel commented 1 year ago

It was taken from official documentation of typedoc https://typedoc.org/options/configuration/#tsconfig

TypeDoc provides its default configuration for extension in typedoc/tsdoc.json. To add a custom block tag, try:

// tsdoc.json
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"extends": ["typedoc/tsdoc.json"],
"tagDefinitions": [
{
"tagName": "@myCustomTag",
"syntaxKind": "block"
}
]
}
tgreyuk commented 1 year ago

Oh ok. You need to put the extends in a file tsdoc.json (not typedoc.json). Putting the extends in typedoc.json is exposing option keys that don't exist.

sebastianwessel commented 1 year ago

Ahh, ok. Thanks for the help - my fault. The most important thing - it runs, and your awesome plugin allows me to output the documentation in md 🙏

tgreyuk commented 1 year ago

No probs :)