Target shares soared Wednesday after the discount retailer reported fiscal first-quarter earnings and sales that topped analysts' expectations, as it brought more people to its stores and convinced them to spend more money there.

Target's e-commerce sales also surged 42%, as shoppers increasingly turned to its curbside pickup service for online orders, something Amazon can't offer.

Even with the looming threat of 25% tariffs on apparel and footwear imported from China going into effect, Target maintained its outlook for the full year. The upbeat report contrasts those of department store chains earlier in the week, which largely disappointed investors.

Target shares jumped nearly 10% on the news.

Here's what the big-box retailer reported compared with what analysts were expecting, based on Refinitiv data:

Earnings per share, adjusted: $1.53 vs. $1.43 expected

Revenues: $17.63 billion vs. $17.52 billion expected

Same-store sales: up 4.8% vs. growth of 4.2% expected

CEO Brian Cornell said Target is "well-positioned to deliver strong financial performance in 2019 and beyond."

During a post-earnings call with analysts, he said Target's baby and toys businesses outperformed other categories during the latest quarter, and that Target benefited from increased traffic around Valentine's Day and Easter weekend.

"We continue to see a healthy economic backdrop for our business," he said.

Net income grew to $795 million, or $1.53 per share, compared with $718 million, or $1.33 a share, a year ago. That was 10 cents ahead of analysts' estimates.

Total revenues were up 5% to $17.63 billion from $16.78 billion last year. That beat estimates for $17.52 billion.

Sales at Target stores and its online business operating for at least 12 months were up 4.8%, better than expected growth of 4.2%. This marks eight consecutive quarters of same-store sales growth for Target. Target said traffic at stores was up 4.3%, transactions overall were up 4.3% and the average transaction amount was up 0.5%.

Digital sales surged 42%, and purchases that originate online now represent 7.1% of Target's total transactions, up from 5.2% a year ago.