I've encountered a peculiar problem with Typescript (using Visual Studio 2012 and TypeScript v0.9.5) that I could use some help clarifying.
The code snippet below functions correctly:
interface IA {
data: any;
}
interface IB {
data: any;
}
interface IC extends IA, IB { }
However, when incorporating the declaration for JQueryEventObject
like so:
interface JQueryEventObject extends BaseJQueryEventObject,
JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject,
JQueryPopStateEventObject { }
and where the BaseJQueryEventObject is declared as:
interface BaseJQueryEventObject extends Event {
data: any;
delegateTarget: Element;
isDefaultPrevented(): boolean;
isImmediatePropogationStopped(): boolean;
...
}
when attempting to do this:
interface IMyInterface {
data: any;
}
interface IMyCombinedInterface extends JQueryEventObject, IMyInterface { }
it raises the following error message:
Interface IMyCombinedInterface
cannot extend both types JQueryEventObject
and IMyInterface
simultaneously: The properties data
in types JQueryEventObject
and IMyInterface
are not identical.
Does anyone know if I am making an error or if this might be a bug?