summaryrefslogtreecommitdiff
path: root/source/features/extend-diff-expander.tsx
diff options
context:
space:
mode:
authorGravatar Nick Taylor <nick@iamdeveloper.com> 2019-04-21 01:48:07 -0400
committerGravatar Federico Brigante <github@bfred.it> 2019-04-21 13:48:07 +0800
commit9cdb7b377fef47e621a0a0cf5c1df321f1060605 (patch)
treec4c7eea04da66d38ebbf0b8509e4cd2a17c34023 /source/features/extend-diff-expander.tsx
parentdea7e47bcf61640f4dee9e195fed0ad1ae938781 (diff)
downloadrefined-github-9cdb7b377fef47e621a0a0cf5c1df321f1060605.tar.gz
refined-github-9cdb7b377fef47e621a0a0cf5c1df321f1060605.tar.zst
refined-github-9cdb7b377fef47e621a0a0cf5c1df321f1060605.zip
Meta: Add explicit return types on all functions (#1943)
Co-authored-by: Federico Brigante <github@bfred.it>
Diffstat (limited to 'source/features/extend-diff-expander.tsx')
-rw-r--r--source/features/extend-diff-expander.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/extend-diff-expander.tsx b/source/features/extend-diff-expander.tsx
index 72333b82..493a7335 100644
--- a/source/features/extend-diff-expander.tsx
+++ b/source/features/extend-diff-expander.tsx
@@ -2,14 +2,14 @@ import select from 'select-dom';
import delegate, {DelegateEvent} from 'delegate-it';
import features from '../libs/features';
-function expandDiff(event: DelegateEvent) {
+function expandDiff(event: DelegateEvent): void {
// Skip if the user clicked directly on the icon
if (!(event.target as Element).closest('.js-expand')!) {
select<HTMLAnchorElement>('.js-expand', event.delegateTarget)!.click();
}
}
-function init() {
+function init(): void {
delegate('.diff-view', '.js-expandable-line', 'click', expandDiff);
}