Uh oh!
There was an error while loading. Please reload this page.
allow wildcard properties in type statement - #235
Conversation
| return v[0] === '$'; | ||
| }); | ||
| if (hasProps && !hasWildProps ) { |
There was a problem hiding this comment.
Can you format the spacing here?
| num: Number; | ||
| str: String; | ||
| any: Any; | ||
| $extras: Any; |
There was a problem hiding this comment.
Can you use $XXX with a type other than Any?
dengjeffrey
commented
Jan 5, 2019
@rbellens Are you still maintaining this PR? If not I might have some free time to continue where you left off |
rbellens
commented
Jan 14, 2019
@dengjeffrey feel free to do so |
iamareebjamal
commented
May 18, 2019
Can we have this feature soon, please :) |
debkanchan
commented
Apr 24, 2020
Hey can we revive this PR? |
The continuous-integration/travis-ci/pr failure from the integration check isn't related to this PR--it's an issue with gulp@3.9.1's dependency on graceful-fs. Here's a detailed explanation on StackOverflow with some workarounds: https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node. |
Currently it is not allowed to have both wildcard properties and fields. Therefore, it is not possible to define types that allow properties other than the ones defined in the type statement. Only workaround is to not use type statements and manually define the validate rules, which is very cumbersome. See also issues #212 and #213 .
This pull request allows a single wildcard property inside a type definition and when present disables the generation of the default validation rule that does not allow any field other than the ones defined.