A leaf consists of a path that leads ultimately to a simple value. So for example
let' say we have an object with the form { foo: { bar: 5, baz: 'hello' } }
, then
the Leaves of it's type are foo.bar
and foo.baz
.
This type is useful if you need to type things such as paths in an object that lead to a particular value, such as the types of a translation in a json file.
This type represent all the possible leaves of an object type.