In Typescript I am not able to make my interface extend Object when indexer is used (key as string).
If i do not extend Object then it works fine , but intellisense does not give suggestions for Object.hasOwnProperty() method.
interface MyObject extends Object {
[key: string] : string;
}
Above code, I get compile time error as: "Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'string'."
Later in code i would like to use variable of type MyObject to check if it contains a particular key using hasOwnProperty method of Object.