It looks like a false alarm of an output system like PhpStorm.
Stringis not a primitive JavaScript language. It is safe to assign a value to a property Stringhere because a function Stringis that object.
I believe the key idea Value assigned to this primitive will be lostcan be described using code:
> var primitive = "somestring";
> primitive.someprop = 3;
3
> primitive.someprop;
undefined
JavaScript 5 : undefined, null, boolean, string number. , . JavaScript , . . , , .