TypeScript 類型,把 T 所有屬性替換成大寫開頭
T
類型
type CamelCase = { fooFoo: number, bazBaz: { barBar: number } };type PascalCase = CapitalizeObjectKeys<CamelCase> // => { FooFoo: number, BazBaz: { barBar: number } }; Copy
type CamelCase = { fooFoo: number, bazBaz: { barBar: number } };type PascalCase = CapitalizeObjectKeys<CamelCase> // => { FooFoo: number, BazBaz: { barBar: number } };
Generated using TypeDoc
TypeScript 類型,把
T
所有屬性替換成大寫開頭