Skip to content

Add exportKind: "type" for type-only export decarations #11132

@sidntrivedi

Description

@sidntrivedi

Feature Request

  • I would like to work on this feature!

Is your feature request related to a problem? Please describe.
As of now(until the export type PR gets merged), we have exportKind: value for values as well as types. This creates some problems in parsing and then transforming the typescript code correctly.

This feature is part of #10981.

Describe the solution you'd like
Add exportKind: "type" for type-only export decarations like export type A = 2 or export interface B {}, namespaces etc.

"type":

  • Type aliases: export type A = 2
  • Interfaces: export interface B {}
  • declare X: export declare const x: number;

"value":

  • Enums: export enum E {}
  • Namespaces: export namespace X.Y {}

Teachability, Documentation, Adoption, Migration Strategy
Maybe we need to tweak the parser and then the generator with some conditions. Excited to work on it.

Metadata

Metadata

Assignees

Labels

area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions