scotthovestadt / schema-object

Enforce schema on JavaScript objects, including type, transformation, and validation. Supports extends, sub-schemas, and arrays.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alias should inherit properties

danieljuhl opened this issue · comments

When using an alias type the targets properties should be respected.

{
    number: {type: Number},
    alias:  {type: 'alias', index: 'number'},
}

In the above case I can set alias to 'abc', and then number is now a string.

Will write test for this behavior and fix ASAP.

Thanks...

Fixed, and the behavior is tested now.