optimeze ts-ignore

This commit is contained in:
Pieter Lambrecht 2022-09-30 17:40:51 +02:00
parent 47a86744c9
commit 9ada356950

View File

@ -41,13 +41,12 @@ function initWindow(): void {
const documentForms = document.forms
for (var documentForm of documentForms) {
if (documentForm.method.toUpperCase() == 'GET') {
// @ts-ignore: // formdata is not yet supported by TS https://github.com/microsoft/TypeScript/issues/36217
// @ts-ignore: Our version of typescript seems to be too old for FormDataEvent
documentForm.addEventListener('formdata', function(event) {
// @ts-ignore: // formdata is not yet supported by TS https://github.com/microsoft/TypeScript/issues/36217
let formData = event.formData;
// @ts-ignore: // formdata is not yet supported by TS https://github.com/microsoft/TypeScript/issues/36217
for (let [name, value] of Array.from(formData.entries())) {
// @ts-ignore: // formdata is not yet supported by TS https://github.com/microsoft/TypeScript/issues/36217
// @ts-ignore: Our version of typescript seems to be too old for FormDataEvent
let formData = event.formData;
// @ts-ignore: Our version of typescript seems to be too old for FormDataEvent
for (let [name, value] of Array.from(formData.entries())) {
if (value === '') formData.delete(name);
}
});