Skip to content

Conversation

rwysocki-equinix
Copy link

  • Add support for directives without arguments like @required()
  • Add support for custom directive mapping

Closes #422 , #781

* Add support for directives without arguments like `@required()`
* Add support for custom directive mapping

Closes Code-Hex#422, Code-Hex#781
Comment on lines -47 to -74
describe('formatDirectiveObjectArguments', () => {
const cases: {
name: string
arg: DirectiveObjectArguments
want: FormattedDirectiveObjectArguments
}[] = [
{
name: 'normal',
arg: {
uri: 'url',
email: 'email',
},
want: {
uri: ['url', '$2'],
email: ['email', '$2'],
},
},
{
name: 'contains array',
arg: {
startWith: ['matches', '/^$2/'],
email: 'email',
},
want: {
startWith: ['matches', '/^$2/'],
email: ['email', '$2'],
},
},
Copy link
Owner

Choose a reason for hiding this comment

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

I think it is important to maintain backward compatibility. Where have these test cases gone? I would like to see them restored if possible.

Copy link
Owner

@Code-Hex Code-Hex left a comment

Choose a reason for hiding this comment

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

I think the direction is good and it would be helpful if you could respond to the comments.

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.

[Feature Request] Allow functions in directive parameters
2 participants