@WebSocketRoute.Query() is a parameter decorator function for the URL
query string with type casting and assertion.
It is almost same with TypedQuery, but
@WebSocketRoute.Query() is only for WebSocket protocol router function
decorated by WebSocketRoute.
For reference, as same with TypedQuery, @WebSocketRoute.Query()
has same restriction for the target type T. If actual URL query
parameter values are different with their promised type T,
it would be runtime error.
Type T must be an object type
Do not allow dynamic property
Only boolean, bigint, number, string or their array types are allowed
URL query decorator.
@WebSocketRoute.Query()is a parameter decorator function for the URL query string with type casting and assertion.It is almost same with TypedQuery, but
@WebSocketRoute.Query()is only for WebSocket protocol router function decorated by WebSocketRoute.For reference, as same with TypedQuery,
@WebSocketRoute.Query()has same restriction for the target typeT. If actual URL query parameter values are different with their promised typeT, it would be runtime error.Tmust be an object typeboolean,bigint,number,stringor their array types are allowed