Appearance
题目
Convert a string literal to a number, which behaves like Number.parseInt.
Number.parseInt
解答
type ToNumber<S extends string> = S extends `${infer N extends number}` ? N : never;