Ranger was essentially correct in his explanation of the TPS function. But I might be able to clarify that a bit.
The idle switch should close when the throttle stop is 1mm off the idle speed screw. That tells the DME that the engine is idling and accordingly what fuel map to use and to use the ICV for speed control. When the idle speed screw is correctly adjusted the engine speed should be 950rpm with the ICV disconnected and drop to 750rpm when the ICV is connected if the idle switch in the TPS is correctly adjusted. So on an engine at normal operating temperature, you adjust the stop screw for 950rpm. Then adjust the TPS so that the idle switch closes when the stop arm is 1mm off the stop screw. While you can check the TPS at it’s pins, the best check is made at the DME connector. That eliminates any possibility of a faulty engine harness interfering with those signals.
The WOT switch should close at about 40% of full throttle, as I recall. When the WOT switch closes the DME shifts to a different map and ignores O2 sensor data. At 4500 rpm the DME stops using AFM data as the flap should be fully open. From there to the redline the DME uses only engine coolant temperature and rpm for fuel delivery and spark advance. I think the DME uses a different map from 4500rpm up, but I’ve heard conflicting opinions on that.
All of the maps are subject to learned fuel trim, which is based on O2 sensor data taken at part throttle. Since an aged, but operable, O2 sensor typically indicates a leaner mixture than actually exists and we don’t have catalytic converters that can be damaged by high HC in the exhaust, there can be a slight benefit from using a aged sensor.
Understand that learned fuel trim and fault codes are stored in volatile memory and are lost if the DME looses un-switched power. If your kill switch disconnects all power, every time you turn off the switch that data is lost.
The WOT switch is important. If the DME doesn’t see that data the engine will run a bit lean above 4500rpm with a consequent loss of power.
Oil can, and will, leak into the TPS. The switches are simple open metal parts and oil will interfere with their operation. I highly recommend drilling a 1/8-3/16" hole in the center of the round boss on the bottom of the TPS. That gives the oil a place to escape and makes the TPS last a lot longer.
If desired, you can plug the hose from the ICV to the throttle body (best solution) or disconnect the ICV and use the stop screw to set a higher idle. The downside is that you may have to hold some throttle in cold weather until the engine warms up a bit. The upside is that the water pump will be spinning a bit faster and be moving more coolant. That helps to keep the peak engine temp from spiking so high in a red flag situation. I liked an idle of 1200-1500rpm.