Skip to content

Use type for empty interfaces. #2164

@Bashamega

Description

@Bashamega

It would reduce the size of the generated content if empty interfaces were transformed into type aliases, like this:
https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/246360bbfcc64d3d28a772d77edfbdc69cb22747/baselines/dom.generated.d.ts#L1634
To:

type RTCAnswerOptions = RTCOfferAnswerOptions;

We can update the emitter to do this.

This might also slightly reduce the size of the shipped lib.dom.d.ts file in the main TypeScript repo, since type aliases are shorter to declare than empty interfaces. It’s probably a small saving, but still a nice cleanup.
I can work on this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions