39. implement ToNumber<T>

TypeScript
Is this helpful ?

from all members: - accepted / - tried

Implement ToNumber<T> to get an integer number type from integer string.


type A = ToNumber<'1'> // 1
type B = ToNumber<'40'> // 40
type C = ToNumber<'0'> // 0

we can just consider smaller numbers

Let's try to solve this problem within 10 mintues.

Discuss(2)