Search results

Types

Classes
Interfaces
Enums
Functions
Type aliases
Constants

Members

Properties
Methods
Getters
Setters
Enum members
Show privates

Other

In this module only
index / Guides / Reusing types

Reusing types

Creating schemas can get repetitive if you have a lot of different objects which have properties of the exact same structure or type. Objvl allows you to reuse types and structures easily, and make your error handling more dynamic!

Once you pass an object to a schema, it gets frozen so you cannot modify it's contents!

BuildersObjects

Dynamic errors

Every error function's last argument is the path to that property. For example, for the object above, a valid error path would be users/name, users. You can use this string to determine what error to send, or you can directly include it in the error.