Hello, I have some problems with typescript typing.
I’m using webix with JetView and typescript
I have such class:
export default class ErrorMessagePopup extends JetView {
config(): webix.ui.popupConfig {
const body:webix.ui.layoutConfig = {
view:'layout',
type: "clean",
rows: [
{
view: "template",
css: "error",
template: `
<h4>Error!</h4>
<p>Your form wasn't submitted</p>`,
},
],
}
return {
view: "popup",
width: 500,
height: 120,
position: "top",
css: "popup__wrapper",
body:body
}
}
}
VisualStudio complains about “body”
“Type ‘layoutConfig’ is not assignable to type ‘string | baseview’.”
According to “webix.global.d.ts” body should be string or baseview, but I can’t convert “const body” to baseview as well…
Of course I could use “any” here, but I want my code to pass ESLint rules…