Function expressions are not supported in decorators
As your error says, you need to export the function. Decorators don't accept function calls into their properties.
You can find more information on this github issue : https://github.com/angular/angular/issues/15587