Extension Version
0.20260708.2
VS Code Version
1.129.1
Operating system Version
Linux (Pop!_OS 24.04 LTS, Kernel: 7.0.11-76070011-generic)
Steps to reproduce
-
Create an exported object with documented properties.
export const HTTP_STATUS = {
/**
* The request succeeded.
*/
OK: 200,
/**
* A new resource was created.
*/
CREATED: 201,
} as const;
Or use the generated declaration:
declare const HTTP_STATUS: Readonly<{
/**
* The request succeeded.
*/
readonly OK: 200;
/**
* A new resource was created.
*/
readonly CREATED: 201;
}>;
-
Import the object in another file:
import { HTTP_STATUS } from "./status";
HTTP_STATUS.OK;
Hover over OK (or trigger IntelliSense completion).
Issue
With TypeScript 7, VS Code only displays the type (200) and does not show the JSDoc attached to the object property.
The same code works correctly with TypeScript 6, where hovering over HTTP_STATUS.OK displays the property's documentation.
The JSDoc is present both in the source .ts file and in the generated declaration (.d.ts/.d.mts/.d.cts), so it appears the language service is no longer associating property documentation with object literal members. This regression makes libraries that document enum-like as const objects lose all per-property hover documentation.
Extension Version
0.20260708.2
VS Code Version
1.129.1
Operating system Version
Linux (Pop!_OS 24.04 LTS, Kernel: 7.0.11-76070011-generic)
Steps to reproduce
Create an exported object with documented properties.
Or use the generated declaration:
Import the object in another file:
Hover over
OK(or trigger IntelliSense completion).Issue
With TypeScript 7, VS Code only displays the type (
200) and does not show the JSDoc attached to the object property.The same code works correctly with TypeScript 6, where hovering over
HTTP_STATUS.OKdisplays the property's documentation.The JSDoc is present both in the source
.tsfile and in the generated declaration (.d.ts/.d.mts/.d.cts), so it appears the language service is no longer associating property documentation with object literal members. This regression makes libraries that document enum-likeas constobjects lose all per-property hover documentation.