Closed hexiro closed 3 years ago
I have never worked with typescript so I don't know how this should be approached but the idea is good.
Ill do some research about typescript for extensions and see how it works. coding in javascript vs typescript isn't very different, you just have to be a little more type safe.
"TypeScript is a strongly typed programming language which builds on JavaScript giving you better tooling at any scale." - https://www.typescriptlang.org
I have never worked with typescript so I don't know how this should be approached but the idea is good.
maybe i could help 👀
if possible, whenever you're back from vacation, can you provide me with some types? Would make my life easier as apposed to trying to dig around in the extension.
I've actually been able to fetch data with chrome.storage.local.get
outside of the extension which I didn't know I could do. I should be good for now, but I'll let you know if I have any major hiccups.
I believe I just finished the entire components section, but I still have much more to do. I haven't really made any logic changes, but I was planning on contributing after this and replacing most of these callbacks with async / await based code. So if you're alright with that I could either do it inside of this pr, or make a separate one after the typescript stuff.
That is great, I think the async/await refactor should be a separate PR.
will do. I am planning on using axios, but we can talk more when the time comes.
taking a break for now. some of these types need to be fixed up before fitting into typescript, and at that point I might as well just work on async / await. If I do start async/await changes I'll try and keep it as close to the original as possible, with more robust code, and I'll properly test it.
How much extra work do I create for you if I make changes on master? I am planning fixing a couple of bugs and adding small features then make a realease.
not too much work, but since the file extensions are changed from .js to .ts I just need to re-implement your changes in the typescript file. don't worry about me though, I'll just reimplement your changes before I finish the pull request.
closing for now. will reopen if i start to work on this again.
Would it be possible to start migrating to typescript? (i have no idea how this would work with building an extension, but I imagine it's very doable)
This would make it:
Migrating to ts can start off slow, but start to be more strict with types as time goes on.
if you're unfamiliar with typescript, read more here.