For instance, I have an abstract class:
type Tuple = [string, number]
abstract class SomeAbstractClass {
tuples: Tuple[]
}
But when I want to implement this class
class SomeConcreteClass implements SomeAbstractClass {
public tuples = [
['hello', 3],
['world', 4]
]
}
I am getting an error '(string | number)[][] is not assignable to Tuple[]'.
How to tell Typescript that the array I provided actually satisfies the interface?
public tuples = [ <Tuple>['hello', 3], <Tuple>['world', 4] ];