Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.52 KB

File metadata and controls

33 lines (27 loc) · 1.52 KB

Tree path array hard

by Neil Richter @noook

Take the Challenge

Create a type Path that represents validates a possible path of a tree under the form of an array.

Related challenges:

declare const example: {
    foo: {
        bar: {
            a: string;
        };
        baz: {
            b: number
            c: number
        }
    };
}

/* Possible solutions: 
[]
['foo']
['foo', 'bar']
['foo', 'bar', 'a']
['foo', 'baz']
['foo', 'baz', 'b']
['foo', 'baz', 'c']
*/

Back Share your Solutions Check out Solutions