Type safe URL parameter decorator.
TypedParam is a decorator function getting specific typed parameter from the HTTP request URL. It's almost same with the nest.Param, but TypedParam automatically casts parameter value to be following its type, and validates it.
TypedParam
import { tags } from "typia";\@TypedRoute.Get("shopping/sales/:id/:no/:paused")public async pause( \@TypedParam("id", "uuid"), id: string & tags.Format<"uuid">, \@TypedParam("no") id: number & tags.Type<"uint32"> \@TypedParam("paused") paused: boolean | null): Promise<void>; Copy
import { tags } from "typia";\@TypedRoute.Get("shopping/sales/:id/:no/:paused")public async pause( \@TypedParam("id", "uuid"), id: string & tags.Format<"uuid">, \@TypedParam("no") id: number & tags.Type<"uint32"> \@TypedParam("paused") paused: boolean | null): Promise<void>;
URL Parameter name
Optional
Parameter decorator
Jeongho Nam - https://github.com/samchon
Type safe URL parameter decorator.
TypedParam
is a decorator function getting specific typed parameter from the HTTP request URL. It's almost same with the nest.Param, butTypedParam
automatically casts parameter value to be following its type, and validates it.