Skip to content

fix: allow writer functions in property named structures#1412

Open
forivall wants to merge 3 commits intodsherret:latestfrom
forivall:fix-property-name-allow-writers
Open

fix: allow writer functions in property named structures#1412
forivall wants to merge 3 commits intodsherret:latestfrom
forivall:fix-property-name-allow-writers

Conversation

@forivall
Copy link

Fixes #1160

Other solutions possible, as mentioned in #1160 comments


export interface PropertyNamedNodeStructure {
name: string;
name: string | WriterFunction;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hesitant to merge this because people are likely doing comparisons on string. One of the major issues with structures is that changes that make it easier for writing can make it harder to use for reading. At this point, I think this might be too breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support automatically determining if a string literal should be written for a property key or value in Writers.object

2 participants