We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there,
Given the following type:
interface ChatRequestBody { drive_id: string; user_query: string; session_id: string; folders: ('PRE' | 'VDR' | 'AUDIT' | 'POST')[]; }
The folders value gets remapped wrongly when applied with Camelize.
folders
Camelize
expected type CamelizeChatRequestBody = Camelize<ChatRequestBody> to be equal to this:
type CamelizeChatRequestBody = Camelize<ChatRequestBody>
type CamelizeChatRequestBody = { driveId: string; userQuery: string; sessionId: string; folders: ('PRE' | 'VDR' | 'AUDIT' | 'POST')[]; }
But its actually equal to this:
type CamelizeChatRequestBody = { driveId: string; userQuery: string; sessionId: string; folders: 'PRE'[] | 'VDR'[] | 'AUDIT'[] | 'POST'[]; }
I therefore need to do something like this:
type CamelizeChatRequestBody = Camelize<Omit<ChatRequestBody, "folders>> & { folders: ('PRE' | 'VDR' | 'AUDIT' | 'POST')[] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there,
Given the following type:
The
folders
value gets remapped wrongly when applied withCamelize
.expected
type CamelizeChatRequestBody = Camelize<ChatRequestBody>
to be equal to this:But its actually equal to this:
I therefore need to do something like this:
The text was updated successfully, but these errors were encountered: