Ensure Exhaustiveness and Correctness of Object based on Const Array of Objects
Given the following ROUTES: const ROUTES = [ { name: "Login", path: "/login", id: "login" }, { name: "Registration", path: "/registration", id: "registration" }, { name: "Settings", path: "/settings", id: "settings" }, ] as const; How can I create a type (SomeType) for which: every id is used as a key every path is used… Read More Ensure Exhaustiveness and Correctness of Object based on Const Array of Objects