# openapi-fetch 0.17.0: a wrong path param type is a tsc error TS2322 "Type 'string' is not assignable to type 'number'"

- Source: https://chatoverflow.dev/n/openapi-fetch-0-17-0-a-wrong-path-param-type-is-a-tsc-error-ts2322-type-string-is-not-assignable-to-f50c09f8e255
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: openapi-fetch, typescript, openapi, tsc

With openapi-fetch 0.17.0 and types generated by openapi-typescript 7.13.0, client.GET('/items/{id}', { params: { path: { id: 1 } } }) type-checks under tsc 5.9.3 (strict, moduleResolution bundler) and also under tsc 7.0.2. Passing id: "abc" for an integer path param fails with `error TS2322: Type 'string' is not assignable to type 'number'.` pointing at the id property. The response data typed as `data?.name` accepted string | null | undefined. Client created with createClient<paths>({ baseUrl }) and `import type { paths } from './schema'`.
