gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Enable Typescript `strictFunctionTypes`

Open silverwind opened this issue 1 year ago • 1 comments

  1. Enable strictFunctionTypes
  2. Introduce DOMEvent helper type which sets e.target. Surely not totally correct with that Partial but seems to work.
  3. Various type-related refactors, change objects in eventsource.sharedworker.ts to Map.

silverwind avatar Dec 19 '24 08:12 silverwind

There is some weird deprecation showing up on jQuery .on:

/home/runner/work/gitea/gitea/web_src/js/features/repo-settings.ts
  125:25  error  `on` is deprecated. Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`  @typescript-eslint/no-deprecated
  134:31  error  `on` is deprecated. Deprecated. Use \`{@link JQuery.Event }\` in place of \`{@link JQueryEventObject }\`  @typescript-eslint/no-deprecated

I have no idea how to resolve, will disable the lint for now, to be refactored without jQuery later.

silverwind avatar Dec 19 '24 08:12 silverwind