Add types to various low-level functions (#31781)

Adds types to various low-level modules. All changes are type-only, no
runtime changes. `tsc` now reports 38 less errors.

One problem was that `@types/sortablejs` does not accept promise return
in its functions which triggered the linter, so I disabled the rules on
those line.
This commit is contained in:
silverwind 2024-08-10 11:46:48 +02:00 committed by GitHub
parent 9633f336c8
commit 32075d2880
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 123 additions and 77 deletions

View file

@ -60,7 +60,7 @@ async function initRepoProjectSortable() {
handle: '.project-column-header',
delayOnTouchOnly: true,
delay: 500,
onSort: async () => {
onSort: async () => { // eslint-disable-line @typescript-eslint/no-misused-promises
boardColumns = mainBoard.querySelectorAll('.project-column');
const columnSorting = {
@ -84,8 +84,8 @@ async function initRepoProjectSortable() {
const boardCardList = boardColumn.querySelectorAll('.cards')[0];
createSortable(boardCardList, {
group: 'shared',
onAdd: moveIssue,
onUpdate: moveIssue,
onAdd: moveIssue, // eslint-disable-line @typescript-eslint/no-misused-promises
onUpdate: moveIssue, // eslint-disable-line @typescript-eslint/no-misused-promises
delayOnTouchOnly: true,
delay: 500,
});