Hook decorator to mark a method as a lifecycle hook And automatically add it to the global lifecycle hook registry.
The name of the lifecycle hook.
A class decorator function that sets the metadata using the provided options.
class MyClass { // ... @Hook('onStart') onStart () {}} Copy
class MyClass { // ... @Hook('onStart') onStart () {}}
Hook decorator to mark a method as a lifecycle hook And automatically add it to the global lifecycle hook registry.