mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
Added explicit types for several functions
This commit is contained in:
parent
583856d6e8
commit
76213ed169
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ function removeSelected() {
|
|||
if (selected) selected.classList.remove('autocomplete__item--selected');
|
||||
}
|
||||
|
||||
function isSearchField(targetInput: HTMLElement) {
|
||||
function isSearchField(targetInput: HTMLElement): boolean {
|
||||
return targetInput && targetInput.dataset.acMode === 'search';
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ function changeSelected(firstOrLast: Element | null, current: Element | null, si
|
|||
}
|
||||
}
|
||||
|
||||
function isSelectionOutsideCurrentTerm() {
|
||||
function isSelectionOutsideCurrentTerm(): boolean {
|
||||
if (!inputField || !selectedTerm) return true;
|
||||
if (inputField.selectionStart === null || inputField.selectionEnd === null) return true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue