Type alias Left<S>

Left<S>: S extends `${infer I}/${string}`
    ? I
    : S

String literal helper type. Represents the Leftest part of a Route path.

Type Parameters

  • S extends string

    The Route path string type.

Example

Left of 'nested/route/path':

import { type Router } from '@sgrud/shell';

const left: Router.Left<'nested/route/path'>; // 'nested'

Generated using TypeDoc