-
Notifications
You must be signed in to change notification settings - Fork 34
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
Rewrite emailService.js to emailService.ts #985
Comments
@niccolopaganini a couple of high level things to watch out for:
|
Couple of things that I noticed while changing the script
Current status: trying to wrap my head around |
You don't need The reason is that you are creating a module (which just means it exports something that can be imported by other files). Modules are always in strict mode anyway https://stackoverflow.com/a/31685340. |
I think we are probably going to reconsider @shankari how should we approach this moving forward? Should we start supporting another optional field in the dynamic config for this? |
running
Changing |
Clearly Underneath that file, I change the file name |
I activated it and ran the command to get the server up and running to test but got this:
Ignoring the warnings (at least for now), it indicated that there were two semicolons missing, but going through the code, I cannot find anything. What I can notice is some inconsistency with curly-braces. Going through the code now... |
Figured... I missed one |
Okay it did not, the bracket was part of the problem but not the whole solution. Let me stare at it a little bit and see what's up. |
Yes, this is good.
I think that there should be two configs.
I wanted to implement this #850 (comment), #850 (comment) Once we implement this app-level config, we can close #850 |
I tried peeking into the code but I am unable to find anything. Considering this code chunk:
is going to be replaced anyway, I went forward with changing the code and then troubleshoot. Please let me know if this is a good approach @JGreenlee. Since you're traveling, I will insert the code chunk here for convenience (hopefully 🥶):
|
Quick Question:
Since we're going to replace with Shankari's email address, can I rewrite the above it in such a way that the "function" remains the same? Something like:
What do you think @JGreenlee ? |
For the current changes that I have rewritten, these are the errors I am getting:
|
I kind of rewrote the code from what I can understand |
I kind of rewrote the code to address the issues but let's see... |
Peeked into the CLI when running the server and this is what I got:
|
I am not sure where I got it wrong. Reverting the changes I made and restoring the original code structure |
Most of the other service rewrites have been from I have also gotten WSOD a few times when I've been re-writing, and it's typically been that I forgot to remove/replace all references to the old version of the file. When you get WSOD, it can help to have the debugger connected and see what the error message is (it's usually super long, but normally points me in the right direction).
Warnings like these are usually not the problem, even if a translation is missung the code usually still runs. |
Long term, this should be part of the app config e-mission/e-mission-docs#985 (comment)
Took a lot of advice from @Abby-Wheelis. I currently rewrote the entire thing just to see if it works (@JGreenlee suggested to just use Shankari's email address). I removed I am unable to notice any errors in the inspect console in Google Chrome but as soon as I try to navigate to the Profile section in the DevApp, it shows a WSOD. I currently have no idea why... |
|
Closing this issue since its resolved |
Child Issue of #977 (Angular Services needing rewrite)
Addressing this file: https://github.com/e-mission/e-mission-phone/blob/fce117ff859abd995613bd405dbc7d27c703b09b/www/js/control/emailService.js
I will work on converting this file from
emailService.js
toemailService.ts
The text was updated successfully, but these errors were encountered: