Skip to content

Conversation

@Eze-Scribd
Copy link
Contributor

Added a new way to add type casting to reference

It now supports type casting of two ways. Strict and Optional

For an optional type casting:
Before:

reference: .named("identifier") | .named(" as? ") | TypeIdentifier.entityRelationshipIdentifier.reference)

Now:

reference: .named("identifier") | .as(.optional(TypeIdentifier.entityRelationshipIdentifier)))

For an strict type casting:
Before:

member: .named("$0") | .as | TypeIdentifier.optional(wrapped: .entityMetadata).reference)

Now:

member: .named("$0") | .as(.strict(TypeIdentifier.optional(wrapped: .entityMetadata)))

@Eze-Scribd Eze-Scribd merged commit d439993 into master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants