To avoid code duplication, it is convenient to break them into functions, in the extension I also want to do this, but make some functions private/service, so that the user does not have access to them, but in the extension they can be used.
I could not find such an opportunity. Can you please tell me is it possible?
I guess this is probably only possible with JavaScript.
If we talk about implementation, then this is the visibility area (or namespace).
And it has already been implemented, because the life cycle methods are not visible in the event list, for others it is possible to set such a “sign” by method.