Skip to content

Remove assert in symbolToParameterDeclaration - #24136

Merged
Mohamed Hegazy (mhegazy) merged 2 commits into
masterfrom
inferFromUsageFixes
May 16, 2018
Merged

Remove assert in symbolToParameterDeclaration#24136
Mohamed Hegazy (mhegazy) merged 2 commits into
masterfrom
inferFromUsageFixes

Conversation

@mhegazy

Copy link
Copy Markdown
Contributor

Also adds a test.

//// }


verify.rangeAfterCodeFix("props: { isLoading: any; update: (...arg0: any) => void; }",/*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0); No newline at end of file

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.

Type is wrong. Should be ...arg0: any[] that little bit not being implemented is probably why it was asserted.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yeah, was looking into this

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.

In maybeAddJsSyntheticRestParameter we just to a switch to create an array type when building the last type if it's a rest type, probably just need to do a similar thing in symbolToParameterDeclaration.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

fixed.

@mhegazy
Mohamed Hegazy (mhegazy) deleted the inferFromUsageFixes branch May 16, 2018 21:15
@microsoftMicrosoft (microsoft) locked and limited conversation to collaborators Jul 31, 2018
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mhegazy@weswigham