How can I write HasNumber without typescript giving me an error because on HasNumberAndString name is not a number? I want a way to en         
        
There is no great way in TypeScript to allow a type with an index signature to have an additional property that doesn't match the index signature type. See microsoft/TypeScript#17867 for the suggestion to allow exceptions to index signatures, and maybe give it a
You could use union types to allow any property of type string or number:
interface HasNumber {
    [key: string]: number;
}
interface HasNumberAndString {
    [key: string]: string | number;
}
But this will not enforce having at least one property of each type.