Richardson inked his four-year, $42 million contract extension today, the team announced. The deal, reported last week and confirmed by the Post, starts in 2018-19 and includes a player option for the fourth year. The extension was a nice birthday gift for the 6-foot-6 guard, who turned 24 on Friday.

OFFICIAL: The Miami HEAT have signed G Josh Richardson to a multi-year contract extension.

The 6-foot-6 Richardson became eligible for an extension last month and he received the maximum offer. The signing, though, will not affect the Heat’s cap this season. A second-round pick in the 2015 draft (40th overall) out of Tennessee, Richardson will make $1.47 million this season.

Richardson emerged late in his rookie season (2015-16) when he made a league-best 53.3 percent of his 3-point shots after the All-Star break. He ended the season shooting 46.1 percent (53-of-115) on threes, the highest percentage by a Heat rookie in team history while also tying the third-highest percentage by any rookie in NBA history (with a minimum of 100 attempts). Additionally, he shot 58.9 percent (33-of-56) during the month of March in his rookie season, marking the second-highest percentage for a single month in NBA history (with a minimum of 50 attempts) while capturing Rookie of the Month honors.

But he had a rough second season because of injuries. Richardson got off to a slow start, missing all of training camp because of a knee injury and then 10 of the first 23 games because of the knee and a sprained ankle. He then sat for 19 games after spraining his left foot before returning to play in the final 25 games.

Richardson slowly worked his way back and after guard Dion Waiters was injured in March, Richardson played his best basketball at the end of the season. He averaged 15 points and shot 53.1 percent from 3-point range over the final six games of the season. He finished the season averaging 10.2 points, 3.2 rebounds and 2.6 assists.

A big part of Richardson’s value to the Heat is his versatility and his defense. He can play shooting guard, point guard and small forward and his long, wiry frame allows him to defend all three perimeter spots.