jsr icon indicating copy to clipboard operation
jsr copied to clipboard

Class re-exported as const should still be listed in documentation

Open cshaa opened this issue 1 year ago • 0 comments
trafficstars

The Problem

Sometimes I come across a scenario where instead of the normal class export

export class Foo { ... }

... I need to slightly modify the exported type without changing the runtime value. The only way to do this in TS is to assign the class value to a constant, and then merge it with a type:

class FooClass { ... }
export const Foo = FooClass;
export type Foo = ...;

Doing this results in Foo listed as a variable, without any further info. Listing stuff like methods would be nice.

Real-Life Example

cshaa avatar Aug 19 '24 12:08 cshaa