A type [number, string]is a type of a size-2 array that you might consider a tuple. Let me call this type YourTuple.
Since you want to sOptionscontain a bunch of them, it must be of type Array<YourTuple>(also written YourTuple[]).
Then, to write many of them to the sOptions array, you need to use the correct array syntax, with the addition of additional [ ... ], for example:
let sOptions: [number, string][];
sOptions = [ [1, "Female"], [2, "Male"], [3, "Other"] ];
, TypeScript , , , , 2.
- , , , :
interface NumberAndGender {
number: number;
gender: string;
}