add `returnOneOfWeighted` and fixed a few broken type definitions