32 lines
No EOL
1.4 KiB
Text
32 lines
No EOL
1.4 KiB
Text
==== 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 {
|
|
~~~~~~~~~
|
|
!!! Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath':
|
|
!!! Types of property 'x' are incompatible:
|
|
!!! Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'.
|
|
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'); |