Skip to content

Conversation

@djbe
Copy link
Collaborator

@djbe djbe commented Nov 21, 2016

Add a parameter to the VariadicArgument type to make it more consistent with the Argument type.


open class VariadicArgument<T : ArgumentConvertible> : ArgumentDescriptor {
public typealias ValueType = [T]
public typealias Validator = (T) throws -> T
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 the validator should take ValueType (Array of Value) instead of each individual Value. You might wish to validate the set together, for example the amount of them, or the values for uniqueness.

What do you think about changing the validator to be an array of values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure.

@djbe
Copy link
Collaborator Author

djbe commented Nov 26, 2016

@kylef any news on when you'd be able to release 0.6? Would be nice to be able to use the new features in SwiftGen.

@kylef
Copy link
Owner

kylef commented Nov 26, 2016

@djbe I'll be traveling today, I'll try push a release out tomorrow or Monday.

@kylef kylef merged commit 2efac8d into kylef:master Nov 26, 2016
@djbe djbe deleted the feature/variadic-argument-validation branch November 26, 2016 21:20
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.

2 participants