Skip to content

Quote non-standard object keys #48

Discussion options

You must be logged in to vote

Hi @morphsteve,

At the moment the writing out of TypeScript and especially identifiers happens in a lot of places. We have transformers in the package but I see you're using data so we also have a transformer over there.

You're welcome fixing this with the regex over here (https://github.com/spatie/laravel-data/blob/main/src/Support/TypeScriptTransformer/DataTypeScriptTransformer.php) with a Pr. This already should fix your case because you're using Laravel data.

As for the future, I'm completely overhauling typescript-transformer, probably the biggest release since it's conception. The plan is to make writing out identifiers a part of the package so the code you'll write for the data tra…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@morphsteve
Comment options

@rubenvanassche
Comment options

Answer selected by morphsteve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants