Skip to content
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

port js to ts #1270

Merged
merged 3 commits into from
Feb 25, 2025
Merged

port js to ts #1270

merged 3 commits into from
Feb 25, 2025

Conversation

JYC333
Copy link
Contributor

@JYC333 JYC333 commented Feb 25, 2025

No description provided.

@@ -26,13 +37,13 @@ export default class RightDropdownButtonWidget extends BasicWidget {
};
}

doRender() {
doRender(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's a need to explicitly declare the return type of functions here.
I personally don't mind it, but I haven't seen that being done across the TriliumNext codebase, but I'll leave it to @eliandoran to decide :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pano9000 , indeed generally it's not needed.
The only case when we should add is when the return type is non-obvious (i.e. there are multiple return points, each forming the data in a different way).

Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and welcome back, @JYC333 !

@eliandoran eliandoran merged commit cd78955 into develop Feb 25, 2025
3 checks passed
@eliandoran eliandoran deleted the porting_js branch February 25, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants