I have the following interface which represents a tree like structure
interface IRoute {
readonly path: string,
readonly children?: IRoute[]
}
Is it possible to derive a string union of all the possible paths?
eg
type AllRoutes = 'path1' | 'path1/path2' | `path3' | ...;