-
-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Milestone
Description
Search terms
Generics, inferred types, conditional types, return types
Expected Behavior
The return type for the following function should be rendered as Content extends object ? Content : Other (i.e. as shown in the declaration)
export declare interface Other {}
export declare function m<Content>(content: Content): Content extends object ? Content : Other(m() here is a simplified-for-repro function that gives you back the original parameter if it is of a qualifying type, and otherwise returns an adapter/wrapper of a specific type.)
Actual Behavior
The actual rendering is Content extends object ? Content<Content> : Other, with the input type parameter doubled on itself as though it had a type parameter.
Steps to reproduce the bug
Use the sample code as given.
Environment
- TypeDoc version: 0.28.16
- TypeScript version: 5.4.5
- Node.js version: 20.17.0
- OS: WIndows 10
Reactions are currently unavailable