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

Support class methods defined as a property

Open gausie opened this issue 8 years ago • 3 comments

These methods have an initializer of type [Function] instead of a value in the descriptor.

gausie avatar May 31 '16 10:05 gausie

Can you explain a little more about what the issue is?

knownasilya avatar May 31 '16 12:05 knownasilya

I'd like to be able to decorate methods as follows

@controller('/example')
class Example {
    @get('/')
    hello = (request, reply) => reply('world')
}

gausie avatar Jun 16 '16 14:06 gausie

Ah! Would totally take a PR to support this if you have the time.

knownasilya avatar Jun 16 '16 17:06 knownasilya