The House approved legislation yesterday to require the nation's airlines to equip their fleets by the early 1990s with instruments that warn pilots of impending mid-air collisions.

The bill, approved 405 to 4, in part reflects congressional frustration with a 30-year search by government and industry for equipment that could be carried by aircraft to help prevent mid-air crashes.

The legislation would give the Federal Aviation Administration 18 months to complete development of the TCAS-II, a traffic alert and collision avoidance system for airliners. The equipment would have to be on board airliners with more than 30 seats within 30 months of its certification.

The instrument has a screen that displays nearby aircraft. If a collision appears imminent, the device sounds an alarm about 30 seconds before the anticipated crash and suggests a climb or descent that could prevent the accident.

Supporters say it would cost $80,000 to $100,000 for each TCAS-II to be installed. The equipment has been tested on Piedmont Airlines aircraft, and other carriers plan future tests.

In the first nine months of the year, 857 near-collisions have been reported to the FAA, up from 628 during the same period in 1986. About one in four of the incidents involved at least one airliner, with the rest involving smaller private planes.