import { Tuple } from '../../primitive/Tuple'; import { Replace } from '../Replace'; import { Split } from '../Split'; import { StartsWith } from '../StartWith'; type Recursive = T extends readonly [ infer First extends string, ...infer Rest extends string[] ] ? StartsWith extends true ? Recursive> : Recursive : R; /** * * Extract parameters from a URL path string * * URL 문자열에서 파라미터를 추출하는 타입 * * @param S URL 경로 문자열 / URL path string * * @returns 추출된 파라미터 이름들의 유니온 타입 / Union type of extracted parameter names * * @example * type cases = [ * Expect, never>>, * Expect, 'id'>>, * Expect, 'id'>>, * Expect, 'id'>>, * Expect, 'id' | 'user'>>, * Expect, 'id' | 'user'>>, * ] * * @link https://www.utilscript.site/docs/usage-string/parse-url-params * */ export type ParseUrlParams = Recursive>; export {};