We have a big web-app that uses a lot of angular/material components. When updating angular to v17.3 everything works fine. But because we use a lot of legacy components we want to leave @angular/material and @angular/cdk on v16.2. This is fine because the update material command says that material v16 is compatible with angular v17

But we also want to update Typescript. According to the version compatibility table, the typescript versions should be between 5.2 and 5.5, but does this also apply to angular/material version? Because for angular 16, the max typescript version is lower than 5.2.
What typescript version should we use?