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

chore(client): ts migration #50521

Closed
wants to merge 2 commits into from

Conversation

jmetev1
Copy link
Contributor

@jmetev1 jmetev1 commented May 25, 2023

Checklist:

Closes #XXXXX

@jmetev1 jmetev1 requested a review from a team as a code owner May 25, 2023 18:43
@jmetev1 jmetev1 marked this pull request as draft May 25, 2023 18:44
@github-actions github-actions bot added the platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. label May 25, 2023
@codesee-maps
Copy link
Contributor

codesee-maps bot commented May 25, 2023

👀 Review this PR in a CodeSee Review Map

View the CodeSee Map of this change

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@@ -26,12 +40,13 @@ class WorkerExecutor {
if (e.data?.type === 'contentLoaded') {
resolve(newWorker);
}
// do something else if not contentLoaded?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm in search of some advice. getworker is supposed to return a worker by calling createworker. but if createworker doesn’t get ‘contentloaded’ or has an error, then it won’t return a worker. Right now the failure to get ‘contentloaded’ would result in the call to getWorker inside execute never resolving and the whole thing getting stuck. Typescript is forcing me to address this more directly and so I’ve gone down this path but I wanted some feedback if it seems reasonable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can see it get stuck by changing the test. If the mockworker doesn't call 'contentloaded', the whole thing will hang till jest shuts it down.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i know @ojeytonwilliams had worked on this code before. is it cool to tag you for advice here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm afraid I've never understood this code particularly well, so I can't give particularly useful advice.

All I can say is that, despite being confusing, this code works well. So, if you need to use @ts-expect-error to keep TS from complaining, that's totally fine.

@gikf gikf changed the title Chore ts migration (DRAFT) chore(client): ts migration May 26, 2023
@raisedadead
Copy link
Member

Consider opening PRs as draft (not the same as "convert to draft" after the fact) if you have something in the works. It helps cut the notification noise.

I appreciate your understanding.

@jmetev1
Copy link
Contributor Author

jmetev1 commented May 26, 2023

Consider opening PRs as draft (not the same as "convert to draft" after the fact) if you have something in the works. It helps cut the notification noise.

I appreciate your understanding.

Actually I never knew that was an option. Will do.

@Sembauke Sembauke added the other: decayed Stale issues that need follow up from commentators. Were closed for inactivity label Jul 6, 2023
@Sembauke
Copy link
Member

Sembauke commented Jul 6, 2023

Hey @jmetev1,

I will be closing this pull-request as it has been abandoned. Feel free to revisit/re-open when you feel like it.

@Sembauke Sembauke closed this Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other: decayed Stale issues that need follow up from commentators. Were closed for inactivity platform: learn UI side of the client application that needs familiarity with React, Gatsby etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants