Skip to content

EspoCRM – Open Source CRM Application

TS types refactoring

Yuriid53c4e6df772
diff --git a/client/src/view.ts b/client/src/view.ts
index 97aead50f0..b119469b70 100644
--- a/client/src/view.ts
+++ b/client/src/view.ts
@@ -51,6 +51,7 @@ type ActionHandlerCallback = (event: MouseEvent, element: HTMLElement) => void;
interface ViewSchema {
model?: Model;
collection?: Collection;
+ options?: Record<string, any>;
}
/**
@@ -70,11 +71,16 @@ export default class View<S extends ViewSchema = ViewSchema> extends BullView<S[
*/
collection: S['collection']
+ /**
+ * Options.
+ */
+ options: Record<string, any> & S['options']
+
/**
* @param options Options.
*/
constructor(
- options: Record<string, any> & {
+ options: Record<string, any> & S['options'] & {
model?: S['model'],
collection?: S['collection'],
} = {}