Aleph-Alpha/ts-rs

`rename_all = "camelCase"` fails if fields are already in camelCase

NyxCode opened this issue · 1 comments

#[derive(Serialize, Deserialize, TS, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CamelCase {
    alreadyCamelCase: u32
}

serde_json would serialize this into

{"alreadyCamelCase":0}

but we generate

interface CamelCase { alreadycamelcase: number, }

This is due to a mistake I made in #184 this line should just be s.push(c)

I will submit a PR to fix it ASAP