Skip to content

Fix dts emit for type params for object methods in const context#3265

Open
Andarist wants to merge 1 commit intomicrosoft:mainfrom
Andarist:fix/type-params-in-const
Open

Fix dts emit for type params for object methods in const context#3265
Andarist wants to merge 1 commit intomicrosoft:mainfrom
Andarist:fix/type-params-in-const

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

No description provided.

if len(d.TypeParameters) > 0 {
res := make([]*ast.Node, 0, len(d.TypeParameters))
for _, tp := range d.TypeParameters {
res = append(res, b.reuseNode(tp.AsNode()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was suspicious of this, but it's the same thing we do for pseudochecker.PseudoTypeKindSingleCallSignature just above here.

I do wonder what would happen if you had a type parameter that say extends typeof local. Do we handle that in general?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants