How to edit two bone ik constraint weight in script?

How to edit two bone ik constraint weight in script?

using UnityEngine.Animations.Rigging;

TwoBoneIKConstraint constraint;
TwoBoneIKConstraint constraint = rigLayersHand.GetComponent();

constraint.data.targetPositionWeight = 1.0f;