function checkChangeComponents(comps, setter, vec) {
    // setter has different length than components
    if (comps.length !== getcompexpr_1.typeStringToLength(setter.typeString())) {
        throw new Error("components length must be equal to the target float/vec");
    }
    // duplicate components
    if (duplicateComponents(comps)) {
        throw new Error("duplicate components not allowed on left side");
    }
    // legal components
    getcompexpr_1.checkLegalComponents(comps, vec);
}
throws a runtime error if component access is not valid, and disallows
duplicate components because duplicate components can not be in a left
expression. (for example `v.xyx = vec3(1., 2., 3.)` is illegal, but `v1.xyz
= v2.xyx` is legal.) also checks for type errors such as `v1.xy = vec3(1.,
2., 3.)`; the right hand side can only be a `vec2` if only two components
are supplied
@param comps component string
@param setter how the components are being changed
@param vec the vector where components are being accessed