If parsing a function type fails, parseTypeReference() to ensure something is returned#24567
Merged
7 commits merged intoJun 5, 2018
Merged
If parsing a function type fails, parseTypeReference() to ensure something is returned#245677 commits merged into
7 commits merged into
Conversation
…thing is returned
Contributor
|
Please port to release-2.9 as well |
sandersn
approved these changes
Jun 1, 2018
Member
sandersn
left a comment
There was a problem hiding this comment.
This is OK for a quick fix for 2.9, but is there a way to avoid tryParse? Could you reasonably duplicate the failure behaviour of parseTypeReference by calling createMissingNode directly?
sandersn
approved these changes
Jun 1, 2018
Member
|
Couple of asides: looks like the current commit has a missing semi-colon and a TODO left in. |
Author
|
Actually, I'd like to leave the TODO in because |
sandersn
approved these changes
Jun 1, 2018
Author
sandersn
reviewed
Jun 5, 2018
| signature.typeParameters = parseTypeParameters(); | ||
| } | ||
| signature.parameters = parseParameterList(flags)!; // TODO: GH#18217 | ||
| const parsedParameters = parseParameterList(signature, flags); // TODO: GH#18217 |
Member
There was a problem hiding this comment.
(1) remove comment (2) rename parsedParameters
sandersn
approved these changes
Jun 5, 2018
ghost
pushed a commit
that referenced
this pull request
Jun 5, 2018
…thing is returned (#24567) * If parsing a function type fails, parseTypeReference() to ensure something is returned * Avoid tryParse * Add missing semicolon * Don't check for undefined, check for missing type * Don't set parameters undefined, set to missingList and return false * Update API baselines * Code review
ghost
pushed a commit
that referenced
this pull request
Jun 5, 2018
…thing is returned (#24567) (#24695) * If parsing a function type fails, parseTypeReference() to ensure something is returned * Avoid tryParse * Add missing semicolon * Don't check for undefined, check for missing type * Don't set parameters undefined, set to missingList and return false * Update API baselines * Code review
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #24565