Purpose of the getApp() function in the app.mc file

When I created a new data field project in VSCode I ended up with a function outside of the class defined in the file.

function getApp() as MBOCountdownApp {
    return Application.getApp() as MBOCountdownApp;
}
This isn't present in my older Eclipse created data field projects and when I put a break point on it and run the code it isn't called.  Can anyone throw some light on what this function is for?
  • I think it's just a convenience global function which you can call from a view (for example) to get the app. I assume it was added to help with type checks in the new monkey types system.

    Previously you could've just called Application.getApp() directly and accessed any member of your app class that you wanted, since there was no type checking.

    IOW, it won't be called unless you call it. If you don't need it, you should be able to delete the function to save a few bytes of memory.