mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
56 lines
2.1 KiB
Plaintext
56 lines
2.1 KiB
Plaintext
mergedInterfacesWithConflictingPropertyNames.ts(6,5): error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'string', but here has type 'number'.
|
|
mergedInterfacesWithConflictingPropertyNames.ts(15,9): error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'T', but here has type 'number'.
|
|
mergedInterfacesWithConflictingPropertyNames.ts(39,9): error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'T', but here has type 'number'.
|
|
|
|
|
|
==== mergedInterfacesWithConflictingPropertyNames.ts (3 errors) ====
|
|
interface A {
|
|
x: string; // error
|
|
}
|
|
|
|
interface A {
|
|
x: number;
|
|
~
|
|
!!! error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'string', but here has type 'number'.
|
|
!!! related TS6203 mergedInterfacesWithConflictingPropertyNames.ts:2:5: 'x' was also declared here.
|
|
}
|
|
|
|
namespace M {
|
|
interface A<T> {
|
|
x: T;
|
|
}
|
|
|
|
interface A<T> {
|
|
x: number; // error
|
|
~
|
|
!!! error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'T', but here has type 'number'.
|
|
!!! related TS6203 mergedInterfacesWithConflictingPropertyNames.ts:11:9: 'x' was also declared here.
|
|
}
|
|
}
|
|
|
|
namespace M2 {
|
|
interface A<T> {
|
|
x: T;
|
|
}
|
|
}
|
|
|
|
namespace M2 {
|
|
interface A<T> {
|
|
x: number; // ok, different declaration space than other M2
|
|
}
|
|
}
|
|
|
|
namespace M3 {
|
|
export interface A<T> {
|
|
x: T;
|
|
}
|
|
}
|
|
|
|
namespace M3 {
|
|
export interface A<T> {
|
|
x: number; // error
|
|
~
|
|
!!! error TS2717: Subsequent property declarations must have the same type. Property 'x' must be of type 'T', but here has type 'number'.
|
|
!!! related TS6203 mergedInterfacesWithConflictingPropertyNames.ts:33:9: 'x' was also declared here.
|
|
}
|
|
} |