45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2518: Only an ambient class can be merged with an interface.
|
|
tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2518: Only an ambient class can be merged with an interface.
|
|
tests/cases/compiler/augmentedTypesClass2.ts(16,7): error TS2300: Duplicate identifier 'c33'.
|
|
tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate identifier 'c33'.
|
|
|
|
|
|
==== tests/cases/compiler/augmentedTypesClass2.ts (4 errors) ====
|
|
// Checking class with other things in type space not value space
|
|
|
|
// class then interface
|
|
class c11 { // error
|
|
~~~
|
|
!!! error TS2518: Only an ambient class can be merged with an interface.
|
|
foo() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
interface c11 { // error
|
|
~~~
|
|
!!! error TS2518: Only an ambient class can be merged with an interface.
|
|
bar(): void;
|
|
}
|
|
|
|
// class then class - covered
|
|
// class then enum
|
|
class c33 {
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'c33'.
|
|
foo() {
|
|
return 1;
|
|
}
|
|
}
|
|
enum c33 { One };
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'c33'.
|
|
|
|
// class then import
|
|
class c44 {
|
|
foo() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|