Apply SourceMaps type to redux actions #8077
Merged
Conversation
Signed-off-by: Ryan Duffy <ryan.duffy@lge.com>
|
Thank you for kick-starting this! Do you plan on continuing this PR? |
|
I do! Thanks for the reminder, @darkwing! |
Signed-off-by: Ryan Duffy <ryan.duffy@lge.com>
Signed-off-by: Ryan Duffy <ryan.duffy@lge.com>
Signed-off-by: Ryan Duffy <ryan.duffy@lge.com>
| @@ -130,6 +132,10 @@ async function expandFrames( | |||
| }; | |||
|
|
|||
| originalFrames.forEach((originalFrame, j) => { | |||
| if (!originalFrame.location || !originalFrame.thread) { | |||
ryanjduffy
Apr 15, 2019
Author
Contributor
Not sure if this is the right approach. From what I read in XScope.search(), displayName will always be present and location may be present but thread shouldn't be. However, it was accessed below so perhaps I've misread.
Not sure if this is the right approach. From what I read in XScope.search(), displayName will always be present and location may be present but thread shouldn't be. However, it was accessed below so perhaps I've misread.
| @@ -94,7 +94,7 @@ export async function mapLocation( | |||
| return getGeneratedLocation(state, source, location, sourceMaps); | |||
| } | |||
|
|
|||
| return sourceMaps.getOriginalLocation(location, source); | |||
ryanjduffy
Apr 15, 2019
Author
Contributor
Not sure why source was passed here but seems invalid given the signature of getOriginalLocation.
Not sure why source was passed here but seems invalid given the signature of getOriginalLocation.
jasonLaster
Apr 15, 2019
Contributor
looks like a good catch
looks like a good catch
|
@jasonLaster + @darkwing - I think this is ready for review. Lemme know what you think. |
|
quick scan. this looks really good. |
Signed-off-by: Ryan Duffy <ryan.duffy@lge.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #7925
Summary of Changes
typeof SourceMapsinstead ofany/ObjectConsiderations
I couldn't find a way to import the
typeofthe default export of a module alongside named imports from the same module.Originally, I included two imports and suppressed the eslint error but changed when I realized the frequency this would be required. The current approach is to import the default export and use
typeofin the instance typing later.I also ran into a couple issues that seem to trace back to flow. I've documented them inline but noting them here for traceability in GitHub.
Explicitly typing an array wrapped by a Promise
facebook/flow#5294
Unable to correctly type the result of a spread on a union type.
facebook/flow#7298