I originally tried to stay away from factory functions for decorators, partially this was so that you could use the library without decorators if you liked and it would FEEL a bit nicer. Now that decorators are moving through the standards track I am comfortable moving back to factories. This also provides a ton more flexibility. For example providers can be passed to the @injectable() decorators directly, this also helps with type hints.
This also allows us to move several static attributes to options in the decorator factory.
I originally tried to stay away from factory functions for decorators, partially this was so that you could use the library without decorators if you liked and it would FEEL a bit nicer. Now that decorators are moving through the standards track I am comfortable moving back to factories. This also provides a ton more flexibility. For example providers can be passed to the @injectable() decorators directly, this also helps with type hints.
This also allows us to move several static attributes to options in the decorator factory.