Skip to content

Typescript intellisense for properties

Compare
Choose a tag to compare
@grofit grofit released this 15 Aug 13:10
· 81 commits to master since this release

This release brings in an optional improvement for typescript users where you can use intellisense to select your property within rules by supplying an action to select the property like so:

var ruleset = Treacherous.createRuleset<SomeModel>()
    .addProperty(x => x.SomeProperty)
    .addRule("required")
    .build();

This is completely optional and you can continue to use strings if you wish and should not effect any pure JS users.