A path consists of a path that leads to a simple or complex value. So for example
let' say we have an object with the form { foo: { bar: 5, baz: 'hello' } }
, then
the Paths of it's type are foo
, 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 paths of an object type.