Skip to content

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

@cshaa

Description

@cshaa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs genRelated to the documentation generationupstreamIssue is in upstream project

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions