Type fixes

This commit is contained in:
Yurii
2026-04-21 23:34:10 +03:00
parent 694282ff79
commit d9f0b90b0d
3 changed files with 7 additions and 7 deletions

View File

@@ -150,14 +150,13 @@ export default class View<S extends ViewSchema = ViewSchema> extends BullView<S[
return;
}
scope = scope || null;
timeout = timeout || 2000;
if (!type) {
timeout = void 0;
}
const text = this.getLanguage().translate(label, 'labels', scope);
const text = this.getLanguage().translate(label, 'labels', scope || undefined);
// @ts-ignore
Ui.notify(text, type, timeout);

View File

@@ -201,7 +201,7 @@ export default class BaseFieldView<
/**
* A mode.
*/
mode: Mode = 'detail'
mode: Mode | undefined = 'detail'
/**
* Search params.
@@ -1602,9 +1602,9 @@ export default class BaseFieldView<
return {};
}
const data = {};
const data = {} as Record<string, any>;
data[this.name] = (this.$element.val() as string).trim();
data[this.name] = (this.$element?.val() as string).trim();
return data;
}
@@ -1613,7 +1613,7 @@ export default class BaseFieldView<
* Fetch search data from DOM.
*/
fetchSearch(): Record<string, any> | null {
const value = this.$element.val().toString().trim();
const value = this.$element?.val()?.toString()?.trim();
if (value) {
return {

View File

@@ -11,7 +11,8 @@
"skipLibCheck": true,
"allowJs": true,
"checkJs": false,
"noEmit": true
"noEmit": true,
"strictPropertyInitialization": false
},
"include": [
"client/src",