Sort, so the order is literal, number, string, symbol. literal comes first as its the most specific type.
We need to do that for numbers since all keys are string|symbol in runtime, and we need to check if a string is numeric first before falling back to string.
Sort, so the order is literal, number, string, symbol. literal comes first as its the most specific type. We need to do that for numbers since all keys are string|symbol in runtime, and we need to check if a string is numeric first before falling back to string.