Skip to content

Conversation

@joente
Copy link
Member

@joente joente commented Nov 8, 2025

Description

Adds the option to write anonymous wrap-only type. It is not possible to use type or enumerators in anonymous type but since nesting is possible, this is not that important. We need to prevent the use of type for caching reasons.

Example:

.wrap(&{
  id: '#',
  name: 'str',
  friends: [{
    id: '#',
    name: 'str',
  }]
});

Next to the &{..} anonymous syntax, an ano() function is also created which accepts a thing. This can be useful if you want to create anonymous type dynamically.

This pull request also implements a generic enum definition, see #429

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Test ano
  • Test wrap
  • Test type

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

@joente joente self-assigned this Nov 8, 2025
@joente joente merged commit b2369c5 into main Nov 10, 2025
1 check passed
@joente joente deleted the ano branch November 10, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants