I am attempting to create a custom type that defines an object with a specific number of key-value pairs, where both the key and value are required to be numbers. Here is what I envision:
type MatchResult = {
[key: number]: number;
[key: number]: number;
}
This particular type is meant to represent the result of a match between two teams, with the team ID as the key and the number of goals scored as the value (a practical application of this type).
However, there is an issue in the example above - it's not valid to have multiple index types defined.