Vice Premier Deng Xiaoping said today China "welcomed" a high U.S. State Department official's statement that Washington would give preference to Peking over Moscow in future dealings.

In an interview with American newspaper editorial writers, however, Deng said, "It is not quite appropriate" to consider the United States and China as allies. He repeated his call for all nations to "unite to cope with Soviet hegemonism."

At the 10 a.m. interview, Deng appeared unfamiliar with statements by Richard Holbrooke, the assistant secretary of state for East Asian and Pacific affairs, that the United States would no longer pursue an evenhanded policy toward China and the Soviet Union. The statements were the main item on the Voice of America news broadcast this morning, leading the members of the National Conference of Editorial Writers to ask Deng for comment.

"We welcome this new position of the U.S. government," Deng said, after a long description of occasionally "wavering" relations over the last eight years. "This does not, of course, mean that we have common stands on all questions.""

In response to questions from the editorial writers and resident American journalists allowed to join the interview, Deng discussed Chinese plans for more elections. He also said there would be a trial of the "Gang of Four," the purged political clique including the widow of the late Communist Party chairman Mao Tse-tung, but that it would be closed to foreign reporters.

He said there "need be no hurry" in solving the dispute between the United States and China on textile quotas, but indicated the barriers to Chinese textiles sales hindered trade. "We are in debt to you. How long must we remain in debt?" he asked.

Deng said China was trying out elections of officials at county levels but that electing a national legislature in the American fashion would be more difficult.

"Our country has four times as many people, so we would need four times as many legislators," he said. "If we have four times as many legislators, the way they operate in your country, how can a country be run?" Deng repeated his desire to resign as vice premier -- while keeping his far more influential post as party vice chairman, and two other key positions -- to free himself from "routine work." He said that China's parliament, the National People's Congress, would have to decide in August whether to accept his resignation.

He said he planned to retire from all his posts and serve only as an adviser in 1985. In the future, he said, high national leaders would serve renewable five-year terms and provincial leaders three-year terms.

Deng said preparations for a trial of the Gang of Four were still under way, but that their crimes were "staggering." Asked about press freedom in China, he repeated his strong criticism of the now moribund democracy movement that briefly allowed some young Chinese to publish critical magazines and wallposters last year. He said the movement had led to unspecified "destructive results for the economy."

Another vice premier, former Anhui provincial leader Wan Li, welcomed Maryland Gov. Harry Hughes at a banquet in the Great Hall of the People. Hughes complimented Wan, who had supervised the construction of the massive hall in 1959, on the speed of the construction. He suggested that Wan apply his skills to the Baltimore subway system. The two leaders also expressed an interest in exchanges between Maryland and Anhui on agricultural technology.

Hughes will fly to Anhui to return a visit made by Wan to Maryland last year.