bcherny/json-schema-to-typescript
在 GitHub 查看Add option to prepend "readonly" to all fields
Open
#627 创建于 2024年9月2日
enhancementgood first issuehelp wanted
仓库指标
- Star
- (3,302 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
This would be nice to ensure i don't accidentally try playing with values from responses but create my own local copy instead
Example:
start "" json2ts -i "schemas/pietsmiet.de/*.schema.json" -o "src/responses/pietsmiet.de/" --inferStringEnumKeysFromValues true --readonly true
export interface PietsmietDEConfig {
readonly API: Record<string, Record<string, string>>;
readonly URLs: Record<string, string>;
readonly Limits: Record<string, number>;
readonly Orders: Record<string, string>;
readonly Platform: Record<string, string>;
readonly Stream: Record<string, string>;
}
...