-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Continue JS -> TS conversion #435
Conversation
I am investigating the CI issue. Feel free to offer me any suggestions. |
Also replace "require" with "import" and "module.exports" with "export".
We need to enable esModuleInterop to solve error TS1192: ``` error TS1192: Module '"tls"' has no default export. ```
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.
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.
b8836a0
to
c1cf28c
Compare
thanks for this great contribution, not a clue on the ci issue, if it's too hard to find the ci issue maybe splitting this PR would be a good way to know where is the problem |
8d58871
to
dea18cd
Compare
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. ```
My attempts to change regex to solve exponential backtracking failed, so I am reverting the commits. |
13981f5
to
068e439
Compare
This PR #436 helped me identify the problem and should also be merged. CI is green, everything seems to be fine. |
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
This commit completes the TypeScript conversion [1] by replacing the CommonJS `require` syntax with TypeScript's `import` syntax. [1]: lnp2pBot#435
This commit completes the TypeScript conversion [1] by replacing the CommonJS `require` syntax with TypeScript's `import` syntax. [1]: #435
No description provided.