You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
My team likes the type checking capabilities of this library. We do not want the object immutability. To disable it, we always set NODE_ENV=production even in development.
This also had the effect of making the error messages much less helpful. For example, when NODE_ENV=development it says this, which we prefer:
TypeError: [tcomb] Invalid value {} supplied to input: Input/tracks: Array<Track>/0: Track/deal: ?Deal/startDate: ?date
But setting NODE_ENV=production changes the same error to this:
TypeError: [tcomb] Invalid value { ... } supplied to input (expected a Input)
This vague error message is making development much harder.
It would be nice if there was a way to configure these two things separately. We would like to disable object freezing but keep the more descriptive error messages. Perhaps two different environment variables like TCOMB_IMMUTABLE=false or ERROR_LOG_LEVEL=2.
The text was updated successfully, but these errors were encountered:
I'm sorry. I forgot to mention that we're using babel-plugin-tcomb. The error message we are seeing must be from their compiled code instead, which produces more vague error messages.
So I guess what we're actually asking for is the ability to disable freezing but keep tcomb's helpful error messages. We don't want to have to set NODE_ENV=production causing babel-plugin-tcomb to switch to the disfavored error messages.
My team likes the type checking capabilities of this library. We do not want the object immutability. To disable it, we always set
NODE_ENV=production
even in development.This also had the effect of making the error messages much less helpful. For example, when
NODE_ENV=development
it says this, which we prefer:But setting
NODE_ENV=production
changes the same error to this:This vague error message is making development much harder.
It would be nice if there was a way to configure these two things separately. We would like to disable object freezing but keep the more descriptive error messages. Perhaps two different environment variables like
TCOMB_IMMUTABLE=false
orERROR_LOG_LEVEL=2
.The text was updated successfully, but these errors were encountered: