Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScripttypeof type queriesSingle-choice MCQ

What is the type of `Method` for this `as const` array of objects?

const routes = [ { path: "/", method: "GET" }, { path: "/users", method: "POST" }, ] as const; type Method = (typeof routes)[number]["method"];