Type Alias DotPathLeaf<DP>

DotPathLeaf<DP>: DP extends `${string}.${infer K}`
    ? DotPathLeaf<K>
    : DP

get the leaf-key of a dot-path (ie: end point).

Type Parameters

let leaf_key: DotPathLeaf<"kill.your.self"> = "self" // correct assignment
let incorrect_leaf_key: DotPathLeaf<"kill.your.self"> = "your" // typescript error