@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Type Alias DotPathParent<DP>

    DotPathParent: DP extends `${infer P}.${DotPathLeaf<DP>}` ? P : DP

    get the parent-key dot-path of a dot-path. but if there's no parent key, then the key itself is returned.

    Type Parameters

    let dotpath0: DotPathParent<"kill.your.self.once"> = "kill.your.self"
    let dotpath1: DotPathParent<typeof dotpath0> = "kill.your"
    let dotpath2: DotPathParent<typeof dotpath1> = "kill"
    let dotpath3: DotPathParent<typeof dotpath2> = "kill"