JohnWeisz / TypedJSON

Typed JSON parsing and serializing for TypeScript that preserves type information.
MIT License
603 stars 64 forks source link

Indent with string | number | null #185

Open sumbricht opened 3 years ago

sumbricht commented 3 years ago

I'm not a big fan it space indentation as I have a strong preference on tabs :-). The TypeScript declaration currently defines ITypedJSONSettings.indent as number | null; I'm suggesting to change that to number | string | null.

As far as I can tell, nothing else needs to be changed as all you're doing with the indent property is pass it as 3rd parameter to JSON.stringify, which already accepts number | string as the "space" parameter.