A molded stator assembly including a stator and a substrate having a position detection circuit of a rotor mounted thereon and an outer frame thereof being formed from mold resin, the molded stator comprising: a donut-shaped lead-wire wiring component that is attached to an end of the stator in the axial direction, wires power-supply lead wires to a winding wire of the stator , and wires sensor lead wires to the position detection circuit, [[and]] a power-supply lead-wire holding component ; a sensor-lead-wire holding component ; and a lead-out component that is provided on a radially outer side of the lead-wire wiring component and leads out the power-supply lead wires and the sensor lead wires to outside of the molded stator, the lead-out component including a projection that has plane parts, on the radially outer side, that are substantially perpendicular to a radial direction of the stator , the lead-out component including two types of latching parts , one of the two types of latching parts holding the power-supply lead-wire holding component and the power-supply lead wires , the other type of latching parts holding the sensor-lead-wire holding component and the sensor lead wires , the power-supply lead-wire holding component including legs hooked on the one type of latching parts , and a rib abutting on the lead-out component , the sensor-lead-wire holding component including L-shaped legs hooked on the other type of latching parts , characterized in that the lead-out component and the lead-wire wiring component are positioned with a certain distance therebetween. a donut-shaped lead-wire wiring component that is attached to an end of the stator in the axial direction, wires power-supply lead wires to a winding wire of the stator , and wires sensor lead wires to the position detection circuit, [[and]] is attached to an end of the stator in the axial direction, wires power-supply lead wires to a winding wire of the stator , and wires sensor lead wires to the position detection circuit, [[and]] a power-supply lead-wire holding component ; a sensor-lead-wire holding component ; and a lead-out component that is provided on a radially outer side of the lead-wire wiring component and leads out the power-supply lead wires and the sensor lead wires to outside of the molded stator, is provided on a radially outer side of the lead-wire wiring component and leads out the power-supply lead wires and the sensor lead wires to outside of the molded stator, the lead-out component including a projection that has plane parts, on the radially outer side, that are substantially perpendicular to a radial direction of the stator , the lead-out component including two types of latching parts , one of the two types of latching parts holding the power-supply lead-wire holding component and the power-supply lead wires , the other type of latching parts holding the sensor-lead-wire holding component and the sensor lead wires , the power-supply lead-wire holding component including legs hooked on the one type of latching parts , and a rib abutting on the lead-out component , the sensor-lead-wire holding component including L-shaped legs hooked on the other type of latching parts , characterized in that the lead-out component and the lead-wire wiring component are positioned with a certain distance therebetween. <EOS>