when variable has declared type then just add the assignment value,
don't assign it because that will overrride an existing declared type
that can also have javascript stuff already defined.

added test