Skip to content

Certain modifier tags no longer included in json output since v0.25 #2802

@ben-polinsky

Description

@ben-polinsky

Expected Behavior

@alpha tags (tested @beta and @experimental tags with the same result) used to document types should be available in the modifierTags array of the corresponding node in json output produced by TypeDoc.

Actual Behavior

Since version 0.25, the above behavior is no longer the case.

Steps to reproduce the bug

Consider the following:

/**
 * No issues here, correctly has `@alpha` in modifierTags
 * (behavior is the same with beta or experimental tags)
 * @alpha
 */
export type AlphaOk = number | string;

/**
 * Now, no `@alpha`
 * (behavior is the same with beta or experimental tags)
 * @alpha
 */
export type AlphaNoGo = (arg: number | string) => void;

Will produce the following output in versions <0.26:
stackblitz link run npm run docs

	"id": 2,
	"name": "AlphaNoGo",
	"variant": "declaration",
	"kind": 2097152,
	"flags": {},
	"comment": {
		"summary": [
			{
				"kind": "text",
				"text": "Now, no "
			},
			{
				"kind": "code",
				"text": "`@alpha`"
			},
			{
				"kind": "text",
				"text": "\n(behavior is the same with beta or experimental tags)"
			}
		],
		"modifierTags": [
			"@alpha"
		]
	},

But the following output in versions >=0.26
stackblitz link run npm run docs

   "id": 2,
  "name": "AlphaNoGo",
  "variant": "declaration",
  "kind": 2097152,
  "flags": {},
  "comment": {
  "summary": [
	  {
		  "kind": "text",
		  "text": "Now, no "
	  },
	  {
		  "kind": "code",
		  "text": "`@alpha`"
	  },
	  {
		  "kind": "text",
		  "text": "\n(behavior is the same with beta or experimental tags)"
	  }
  ]
  },

Environment

  • Typedoc version: Tested failures with 0.26.0; 0.26.11; and 0.27.2
  • TypeScript version: various 5.x
  • Node.js version: 22; 20
  • OS: Mac; Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions