Skip to content

Add support for components in both positions of pairs#164

Merged
Ukendio merged 5 commits intomainfrom
conditional-typed-pairs
Dec 24, 2024
Merged

Add support for components in both positions of pairs#164
Ukendio merged 5 commits intomainfrom
conditional-typed-pairs

Conversation

@Ukendio
Copy link
Copy Markdown
Owner

@Ukendio Ukendio commented Dec 14, 2024

Currently if you want your pairs to have relation data, you have to put a component ID in the first part of the pair. However this restricts usage for many so this PR will let pairs have relation data as long as at least one ID is a component. The behaviour will be that the type gets inferred as the first ID unless it is a tag and in that case it will return the second ID.

pair(Component, Tag) - relation data is typed as First ID
pair(Component, Component) - relation data is typed as First ID
pair(Tag, Component) - relation data is typed as Second ID
pair(Tag, Tag) - no relation data as the pair is considered a tag

@Ukendio Ukendio changed the title Add support for components in both positions of pairs Adds support for components in both positions of pairs Dec 14, 2024
@Ukendio Ukendio changed the title Adds support for components in both positions of pairs Add support for components in both positions of pairs Dec 14, 2024
@Ukendio Ukendio merged commit eaafd27 into main Dec 24, 2024
@Ukendio Ukendio deleted the conditional-typed-pairs branch June 10, 2025 15:13
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.

1 participant