Type alias DotPathParent<DP>

DotPathParent<DP>: 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

Example

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"

Generated using TypeDoc