core-decorators icon indicating copy to clipboard operation
core-decorators copied to clipboard

Explain applyDecorators() for a function prototype

Open jslz opened this issue 7 years ago • 0 comments

hi, any chance somebody has example code for how to use applyDecorators() on a non-class-method stand-alone kind of function? I don't know what key to use for the property.

The docs only say:

// This works on regular function prototypes
// too, like `function Foo() {}`
applyDecorators(Foo, {
  getFoo: [autobind]
});

jslz avatar Mar 20 '18 20:03 jslz