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