Error on trying to assign a value to the field: Type 'number' is not assignable to type 'string'

Symptoms

Error on trying to assign a value to the field:

Type 'number' is not assignable to type 'string'

Cause

Field type differs from the type of value that is assigned to the field's value.

Resolution

Try converting the value to the necessary type prior to assigning it to the field.

I.e., if the value needs to be converted to string, use .toString() method. The method can be used as follows:

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request