Constrains T to extend Base at compile time while preserving T's exact inferred shape in tooltips and assignability checks.
T
Base
Concrete type being validated.
Constraint that T must extend.
type Endpoint = Satisfies< { method: "GET"; path: "/users" }, { method: "GET" | "POST"; path: string }>;// ^? { method: "GET"; path: "/users" } Copy
type Endpoint = Satisfies< { method: "GET"; path: "/users" }, { method: "GET" | "POST"; path: string }>;// ^? { method: "GET"; path: "/users" }
Constrains
Tto extendBaseat compile time while preservingT's exact inferred shape in tooltips and assignability checks.