interface ErrorContainer { // { email: 'Not a valid email', username: 'Must start with a character!' } [prop: string]: string; } const errorBag: ErrorContainer = { email: 'Not a valid emial!', username: 'Must start with a character!' };