Type Alias DotPathLeaf<DP>

DotPathLeaf: 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
// @ts-ignore
let incorrect_leaf_key: DotPathLeaf<"kill.your.self"> = "your" // typescript error