Skip to content

RFC: Add a new decorator to classify bindable classes/providers #958

@raymondfeng

Description

@raymondfeng

To allow boot to discover and bind certain artifacts such as providers, controllers, repositories, or other classes, a decorator is desirable to add metadata to the class. For example:

@bindable({type: 'controller', name: 'my-controller', tags: [], scope: BindingScope.SINGLETON})
class MyController {
}

@bindable({type: 'booter', name: 'swagger-booter', tags: [], scope: BindingScope.SINGLETON})
class SwaggerBooter {
}

@bindable({type: 'provider', name: 'swagger-booter'})
class LogLevelProvider {
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions