hipstersmoothie/react-docgen-typescript-plugin

Regression in 1.0.5

Opened this issue · 1 comments

Sample code

export enum A {
  static = 'static'
}

TypeScript 5.0.4

In 1.0.4 it generated something like this:

A.static.displayName = "A.static"
A.static.__docgenInfo = { ... }

In 1.0.5 it generates:

A.static.displayName = "A.static"
static.__docgenInfo = { ... }

(that in this example breaks parsing because static is a reserved word, such that even try/catch doesn't help)

I think it is the result of this commit a91043f

Would you be up for submitting a PR?