Search terms
missing optional, mapped types
Bug
When TypeDoc is given the following to document, it says the type of Test is { x: 1 | undefined } instead of { x?: 1 | undefined }
declare function buildObj<T>(x: T): {
[K in keyof T]?: 1;
};
export const Test = buildObj({ x: 1 });
This happens with exactOptionalPropertyTypes both on and off.
Environment
- Typedoc version: 0.23 + 0.24
- TypeScript version: 4.9.5
- Node.js version: 18
- OS: Linux