Type alias HttpRegExp<T, Pattern>

HttpRegExp<T, Pattern>: T & {
    __meta?: ["httpRegExp", Pattern];
}

For all parameters used in the URL path, a regular expression of /[^/]+/ is used. To change that, use getRegExp.

Example


class Controller {
@http.GET('/user/:username')
route(username: HttpRegExp<string, '.*'>) {
//username is string
}
}

Type Parameters

  • T

  • Pattern extends string | RegExp

Generated using TypeDoc