• What is the significance of the below jswrapper connect section, with type = init. Although Event and static method definitions are pretty much fine.

    I am not able to find much information but this Espruino documentation page

    This part looks like comment only. But there is a nice script in the background, scanning for comments like this. As we can see, there is some data in JSON format. And this is translated into one more C-file. At the end, this generated file is the connection between Javascript file and the compiled C-function.
    When and from where it will be called and

    /*JSON{
      "type" : "init",
      "generate" : "jswrap_xxx_init"
    }*/
    

    EDIT: Similarly Type: kill/idle

About

Avatar for Abhigkar @Abhigkar started