28 lines
No EOL
914 B
Text
28 lines
No EOL
914 B
Text
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer2.ts(17,5): error TS2412: Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'.
|
|
|
|
|
|
==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithStringIndexerHidingBaseTypeIndexer2.ts (1 errors) ====
|
|
interface Base {
|
|
[x: number]: { a: number; b: number }
|
|
x: {
|
|
a: number; b: number;
|
|
}
|
|
}
|
|
|
|
interface Derived extends Base {
|
|
[x: string]: {
|
|
a: number
|
|
};
|
|
|
|
y: {
|
|
a: number;
|
|
}
|
|
// error
|
|
1: {
|
|
~~~~
|
|
a: number;
|
|
~~~~~~~~~~~~~~~~~~
|
|
}
|
|
~~~~~
|
|
!!! error TS2412: Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'.
|
|
} |