-
Notifications
You must be signed in to change notification settings - Fork 115
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
Convert JS to TS (commits 7-13 of PR435) #557
Conversation
@webwarrior-ws please fix the conflicts |
686f94d
to
2576161
Compare
@grunch hey Francisco, this PR doesn't have conflicts anymore, can you review? Cheers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I can't merge, the button is disabled |
Argh, new conflicts again because other PR was merged before. @webwarrior-ws hey mind rebasing again? thanks |
The languageModel & fiatModel interface created to type-check the data and ensure that it conforms to the expected structure and format. This can help you avoid errors and bugs when working with the data in your code. This commit enables resolveJsonModule to import module with '.json' extension. Co-authored-by: webwarrior <[email protected]>
The --downlevelIteration flag is a TypeScript compiler option that enables support for iterating over new concepts like Map, Set, or Generator in older JavaScript runtimes. By default, TypeScript targets ES3, which does not support these features. If you use a for...of loop or a spread operator on an iterable object, you may get an error. Use Date instead of Date.toISOString cause paid_at has type Date and during the conversion from js to ts, we got compilation errors. Co-authored-by: webwarrior <[email protected]>
Co-authored-by: webwarrior <[email protected]>
Using null instead of a boolean/undefined type is better.
I had to change the '|', otherwise typescript would complain this error msg: ``` The '|' operator is not allowed for boolean types. Consider using '||' instead. ``` Co-authored-by: webwarrior <[email protected]>
d7543bf
to
5636ae8
Compare
Rebased. Also re-reviewed changes and made 2 corrections:
This is comparison to the old branch: https://github.com/webwarrior-ws/lnp2pBot/compare/27e805ae26bba8305d25d8bbbafcf4e27953b422..d36a6b75b3436b4d599c83db983b0a4965968c67 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work guys!!! sorry for the delay
Hey @webwarrior-ws and @knocte we are having trouble with this PR, disputes are not working well, I have to revert this PR, sorry, let's use this PR as base of a new one which we will test more. BTW we need to start fixing unit test, while the bot is getting bigger testing new code is way more difficult |
Hey Francisco, last time you reverted something you were not specific enough and because of that we couldn't get to the bottom of it. Let's not do the same here: what do you mean with not working well?? |
The problem I found was when a user started a dispute the bot stop working, I got this on the logs
|
@grunch beautiful thanks; @webwarrior-ws please take a look at this on Monday |
Looks like @Mersho copy-pasted the same guard code in several places without checking what properties should be present. |
@webwarrior-ws awesome, please create new PR tomorrow |
No description provided.