Fixes https://github.com/microsoft/TypeScript/issues/51619 Co-authored-by: Max Schmitt <max@schmitt.mx>