Skip to content

@inline and @inlineType not usable with @typedef #2916

Closed as not planned
Closed as not planned
@stwlam

Description

@stwlam

I wasn't sure whether to report this as a bug or feature request since @inline, etc. aren't explicitly marked as supporting @typedef. But since @typedefs are converted to type aliases or interfaces, it seems it should have worked out of the box.

Search terms

inline, expand, typedef

Expected Behavior

The @inline tag may be placed on type aliases and interfaces. When a type is annotated with @inline and the type is referenced, TypeDoc will attempt to inline the referenced type within the other type.

Actual Behavior

The referenced type and type definition itself fall back to any:

Image

Image

Steps to reproduce the bug

/**
 * @typedef HelloProps
 * @inline
 * @property {string} name Name property docs
 */

/**
 * Hello component - HelloProps will be inlined here as
 * if you had written `Hello(props: { name: string })`
 * @param {HelloProps} props
 */
export function hello(props) {
  return "Hello {props.name}!";
}

Moving the placement of @inline to above @typedef or below the @property has it get ignored entirely (perhaps expected).

Environment

  • Typedoc version: 0.28.1
  • TypeScript version: 5.6.3
  • Node.js version: 22.14.0
  • OS: Ubuntu 22.04.5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions