Functions shouldn't be declared like this in the options block. Rather to add a method on a component you should create a free function that is bound to the component via invokers.