Assume I have the following:
export const ContentType = {
Json: "application/json",
Urlencoded: "application/x-www-form-urlencoded",
Multipart: "multipart/form-data",
};
export interface RequestOptions {
contentType: string,
}
const defaultOptions: Partial<RequestOptions> = {
contentType: ContentType.Json,
};
How would I go about restricting contentType
so that only keys declared in ContentType
are used?