How to validate `Record<string, string>`?
My naïve attempt:
This results in error:
const Response = type({
"*": "string",
});
type Response = typeof Response.infer;
const createResponse = (): Response => {
const values: Record<string, string> = {
value1: "one",
value2: "two",
};
return values;
};const Response = type({
"*": "string",
});
type Response = typeof Response.infer;
const createResponse = (): Response => {
const values: Record<string, string> = {
value1: "one",
value2: "two",
};
return values;
};This results in error:
Property '"*"' is missing in type 'Record<string, string>' but required in type '{ "*": string; }'.Property '"*"' is missing in type 'Record<string, string>' but required in type '{ "*": string; }'.