-
Notifications
You must be signed in to change notification settings - Fork 290
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
Feat/typescript migration #862
base: master
Are you sure you want to change the base?
Feat/typescript migration #862
Conversation
Side note: my last commit is a fix for the response status not properly set when an error occurred. I encountered this error while working on a specific API. I took the opportunity to narrow down the type of the |
I merged master in my branch to keep up to date with latest commits |
fix: endpoint body handles properly internal links
…dify response (in case of using E2EE)" This reverts commit 18afdce.
Waiting for release. |
Unfortunately, the main author did not give much interest in this branch since the MR. I tried to maintain it in phase with master as much as I can, though. |
Hi @mrin9,
So here is the branch where I migrated the project to Typescript.
any
s where typing were difficult to understandThe remaining tasks I see
any
references in the code by proper types// TODO: Typescript migration...
in the code to find mistake in original code now catched by the Typescript compiler (usually it needs refactor or removal)One note about functions. You'll see that many functions have a first parameter named
this
, it's not a real parameter but the way typescript make it clear on which type of object the function is called (as many utility functions are called withcall
). https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-functionExample