]> source.dussan.org Git - gitea.git/commit
Fix a number of typescript issues (#32308)
authorsilverwind <me@silverwind.io>
Thu, 31 Oct 2024 14:57:40 +0000 (15:57 +0100)
committerGitHub <noreply@github.com>
Thu, 31 Oct 2024 14:57:40 +0000 (14:57 +0000)
commit810782302652d73c4f7249c4c3df8a7e85bae5f0
treeed981d0bf2402854c2b22531034d082df3f0f355
parent5e6523aa57771f672dc0e8fb06431d4032308f23
Fix a number of typescript issues (#32308)

- Prefer
[window.location.assign](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign)
over assigning to
[window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location)
which typescript does not like. This works in all browsers including
PaleMoon.
- Fix all typescript issues in `web_src/js/webcomponents`, no behaviour
changes.
- ~~Workaround bug in `@typescript-eslint/no-unnecessary-type-assertion`
rule.~~
- Omit vendored file from type checks.
- `tsc` error count is reduce by 53 with these changes.
web_src/js/components/DiffCommitSelector.vue
web_src/js/features/repo-issue.ts
web_src/js/utils/dom.ts
web_src/js/vendor/jquery.are-you-sure.ts
web_src/js/webcomponents/absolute-date.ts
web_src/js/webcomponents/origin-url.test.ts
web_src/js/webcomponents/origin-url.ts
web_src/js/webcomponents/overflow-menu.ts
web_src/js/webcomponents/polyfills.ts