Adds a parameter resolver for parameters based on its name. Use .resolveParameter() for class-based resolving.
class UserResolver {
resolve(context: RouteParameterResolverContext): any | Promise<any> {
return new User();
}
}
@http.resolveParameterByName('user', UserResolver)
class MyController {
@http.GET()
myAction(user: User) {
}
}
new App({providers: [UserResolver]}).run();
Generated using TypeDoc
Adds a parameter resolver for parameters based on the class type. Use .resolveParameterByName() for name-based resolving.