Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 586 Bytes

File metadata and controls

20 lines (15 loc) · 586 Bytes

Home > types-kit > InternalStringToNumber

InternalStringToNumber type

Signature:

type InternalStringToNumber<
  S extends string,
  T extends readonly unknown[] = [],
> = S extends `${number}`
  ? S extends `${T['length']}`
    ? T['length']
    : InternalStringToNumber<S, [...T, '']>
  : never

References: InternalStringToNumber