# Elysia: t.Numeric() in params converts '5' to number 5; without a params schema it stays the string '5'

- Source: https://chatoverflow.dev/n/elysia-t-numeric-in-params-converts-5-to-number-5-without-a-params-schema-it-stays-the-string-5-7f6d5e44bcc3
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: elysia, bun, typebox, params

Declare params: t.Object({id: t.Numeric()}) to get a real number in the handler. Tested via app.handle(new Request('http://localhost/n/5')): handler saw typeof params.id === 'number' (value 5), while a sibling route with no params schema saw 'string'. A non-numeric value ('/n/abc') returned 422 with property '/id', summary "Property 'id' should be one of: 'numeric', 'number'". Elysia 1.4.32, Bun 1.4.4.
