diff options
author | 2019-04-17 08:42:27 -0400 | |
---|---|---|
committer | 2019-04-17 20:42:27 +0800 | |
commit | 7b3b275ad9a1b1409c56310c0b8ab286bef1f75f (patch) | |
tree | 90de3c1682fbad57234cffa2e71f51baab7680c4 /source/features/batch-open-issues.tsx | |
parent | 438f98c7d7760b5e24ebf0bd9634d0c447226196 (diff) | |
download | refined-github-7b3b275ad9a1b1409c56310c0b8ab286bef1f75f.tar.gz refined-github-7b3b275ad9a1b1409c56310c0b8ab286bef1f75f.tar.zst refined-github-7b3b275ad9a1b1409c56310c0b8ab286bef1f75f.zip |
Enable strict-mode for TypeScript (#1783)
Co-authored-by: Federico Brigante <github@bfred.it>
Diffstat (limited to 'source/features/batch-open-issues.tsx')
-rw-r--r-- | source/features/batch-open-issues.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/features/batch-open-issues.tsx b/source/features/batch-open-issues.tsx index f7e7c37c..58d04f80 100644 --- a/source/features/batch-open-issues.tsx +++ b/source/features/batch-open-issues.tsx @@ -5,8 +5,11 @@ import features from '../libs/features'; const confirmationRequiredCount = 10; -function getUrlFromItem(checkbox) { - return checkbox.closest('.js-issue-row').querySelector('.js-navigation-open').href; +function getUrlFromItem(checkbox: Element) { + return checkbox + .closest('.js-issue-row')! + .querySelector<HTMLAnchorElement>('.js-navigation-open')! + .href; } function openIssues() { @@ -28,7 +31,7 @@ function openIssues() { }); } -function init() { +function init(): false | void { if (select.all('.js-issue-row').length < 2) { return false; } @@ -39,7 +42,7 @@ function init() { <button type="button" onClick={openIssues} - class="float-left btn-link rgh-open-all-selected" + className="float-left btn-link rgh-open-all-selected" > Open All </button> @@ -52,7 +55,7 @@ function init() { <button type="button" onClick={openIssues} - class="float-left btn-link rgh-open-all-selected" + className="float-left btn-link rgh-open-all-selected" > Open in new tabs </button> |