string]: any // <== // Gli altri devono esservi assignabili } type A = MyInterface["a"] // => boolean type C = MyInterface["c"] // => "LOL" type Pippo = MyInterface["pippo"] // => any
{ isZero: False, prev: Zero } type Two = { isZero: False, prev: One } type Succ<N extends Nat> = { isZero: False, prev: N } type One = Succ<Zero> type Two = Succ<One> type Three = Succ<Succ<Succ<Zero>>>