Looks good! Thanks for making all these fixes.
Hey! The best thing to do here would be to assertUnreachable(sortType) (It's a helper we added to Utils.) That uses Typescript's narrowing scopes feature to verify that by the time we reach this line the type of sortType is never, indicating that the switch is exhaustive!