Hi I am trying to create a new view to be used in a Webix Jet TypeScript project.
The following is my code:
interface schematicConfig extends webix.ui.viewConfig { }
interface SchematicApi {
name:string;
$init(config:schematicConfig):void;
};
interface Schematic extends webix.ui.view, SchematicApi {}
const api: Schematic = {
name:"schematic",
$init:function(config) {
/* Some Code */
}
}
webix.protoUI(api, webix.ui.view);
export default class SchematicView extends JetView{
config(){
return { id:"schematic", view:"schematic" };
}
};
The majority of my code is in the $init function within the api variable.
The error I am getting is TS2322.
TS2322: Type '{ name: string; $init: (config: schematicConfig) => void; }' is not assignable to type 'Schematic'.
Property ‘adjust’ is missing in type '{ name: string; $init: (config: schematicConfig) => void; }'
.
I followed the example from: https://docs.webix.com/desktop__typescript.html
I am not sure where I am going wrong here.
Any help would be greatly appreciated.