2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'.
|
|
|
|
Types of property 'x' are incompatible.
|
2014-09-12 22:35:07 +02:00
|
|
|
Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/derivedInterfaceCallSignature.ts (1 errors) ====
|
|
|
|
interface D3SvgPath {
|
|
|
|
(data: any, index?: number): string;
|
|
|
|
|
|
|
|
x(): (data: any, index?: number) => number;
|
|
|
|
y(): (data: any, index?: number) => number;
|
|
|
|
interpolate(): string;
|
|
|
|
tension(): number;
|
|
|
|
defined(): (data: any, index?: number) => boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface D3SvgArea extends D3SvgPath {
|
|
|
|
~~~~~~~~~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'.
|
|
|
|
!!! error TS2430: Types of property 'x' are incompatible.
|
|
|
|
!!! error TS2430: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'.
|
2014-07-13 01:04:16 +02:00
|
|
|
x(x: (data: any, index?: number) => number): D3SvgArea;
|
|
|
|
y(y: (data: any, index?: number) => number): D3SvgArea;
|
|
|
|
y0(): (data: any, index?: number) => number;
|
|
|
|
y0(y: number): D3SvgArea;
|
|
|
|
y0(y: (data: any, index?: number) => number): D3SvgArea;
|
|
|
|
y1(): (data: any, index?: number) => number;
|
|
|
|
y1(y: number): D3SvgArea;
|
|
|
|
y1(y: (data: any, index?: number) => number): D3SvgArea;
|
|
|
|
|
|
|
|
interpolate(interpolator: string): D3SvgArea;
|
|
|
|
tension(tension: number): D3SvgArea;
|
|
|
|
defined(defined: (data: any, index?: number) => boolean): D3SvgArea;
|
|
|
|
}
|
|
|
|
|
|
|
|
var area: D3SvgArea;
|
|
|
|
area.interpolate('two')('one');
|