Skip to content

Enhance type error message

Choose a tag to compare

@cherifGsoul cherifGsoul released this 18 Oct 21:30
· 21 commits to master since this release

This enhance type error message by adding the value type in the message:

Before:

farah.age = '4'; // -> Uncaught Error: 4 is not of type Number. Property age is using "type: Number". Use "age: type.convert(Number)" to automatically convert values to Numbers when setting the "age" property.
`

Now:
farah.age = '4'; // -> Uncaught Error: "4" (string) is not of type Number. Property age is using "type: Number". Use "age: type.convert(Number)" to automatically convert values to Numbers when setting the "age" property.

#143