Interface shorthand, sugar syntax, interfaces of same type, types of same type
Can a shorthand be added to create interfaces/types that have all keys of same type.
Reduce the no of lines & also help in readability.
export interface AllStrings {
prop1: string;
prop2: string;
}
to something like
export interface AllStrings<type: string> {
prop1,prop2;
}
My suggestion meets these guidelines:
What about:
type AllStrings = Record<"prop1" | "prop2", string>
Most helpful comment
What about: