Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value parameters and variadic detection #69

Closed
wants to merge 3 commits into from

Conversation

leohubert
Copy link

@leohubert leohubert commented Sep 1, 2022

Related to #66

o: declaration.questionToken !== undefined || declaration.initializer !== undefined,
o: declaration.questionToken !== undefined || declaration.initializer !== undefined || declaration.dotDotDotToken !== undefined,
var: !!declaration?.dotDotDotToken,
dv: type?.isClass() ? null /*TODO: handle class, but how ? */ : declaration.initializer,
Copy link
Author

Choose a reason for hiding this comment

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

@Hookyns, do you know how to handle private foo: Foo = new Foo() here?

I can't find a documentation link for this part of typescript...

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean "handle it"? detecting runtime values of parameters is out of scope I think.

@Hookyns
Copy link
Owner

Hookyns commented Sep 16, 2022

@leohubert is there any progress?

@leohubert
Copy link
Author

leohubert commented Sep 16, 2022

@leohubert is there any progress?

It's working fine, except for this use case.

class Test { 
   constructor(foo: Foo = new Foo()) { }
}

I don't have time to work on it right now but when I find some, I will continue the investigation :)

@leohubert leohubert closed this Mar 4, 2024
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.

3 participants