Q:

prevent interface from having property with name X

I have this interface : 
interface Config {
    height : number;
    width : number;
    [propName : string] : any;
}

as you can see I have [propName : string] : any which allow me to have any other properties but I need to disallow property with the name key for example.
in other words I want to allow any other property but key

A:

You could add an additional property key?: undefined to Config:
interface Config {
    height: number;
    width: number;
    key?: undefined; // add this line
    [propName: string]: any;
}

const res1: Config = { height: 3, width: 4, me: "too" } // works
const res2: Config = { height: 3, width: 4, me: "too", key: "dsaf" } // error

