typescript return object with nested property code example
Example: creating object of type nested
interface EndpointAuth {
login: string;
}
interface Endpoint {
auth: EndpointAuth;
}
const endpoints: Endpoint = {
auth: {
login: "http://localhost:8079/auth/login"
}
};