import { IfNotUnion, IfNotString } from '../type'; export declare type Path = string | string[] | RoutiderPath | RoutiderPaths; /** * fake symbol for nominal typing */ declare const params: unique symbol; /** * Type for valid path */ export declare type RoutiderPath = { readonly [params]: T; }; /** * Type for valid path and aliases */ export declare type RoutiderPaths = typeof params & RoutiderPath[]; /** * Extracts params from RoutiderPath & RoutiderPaths */ export declare type ExtractParams = Exclude ? P : T extends RoutiderPaths ? P : never, undefined>; /** * Creates typed path. * * @example createPath`/items/${'id'}` */ export declare function createPath(literals: Readonly): RoutiderPath; export declare function createPath(literals: Readonly, ...placeholders: readonly T[]): RoutiderPath>; declare type PathArrayToPaths = T extends RoutiderPath ? RoutiderPaths : T[]; export declare function createPaths(...args: T): PathArrayToPaths>; export declare const pathToString: (path: RoutiderPath | string) => string; export declare const pathsToString: (paths: RoutiderPaths | string[]) => string[]; export {};