This type represents the expression+type arguments you can get in a class or interface heritage clause section. For class-implements clauses, or interface-extends clauses, these expressions can only be identifiers or dotted names. For class extends clauses, these could be any expressions in the future. However, for now, we only support identifiers and dotted names.
15 lines
No EOL
1.1 KiB
Text
15 lines
No EOL
1.1 KiB
Text
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS9002: Only type references are currently supported in a class 'extends' clauses.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,31): error TS1005: ',' expected.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS9002: Only type references are currently supported in a class 'extends' clauses.
|
|
|
|
|
|
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
|
|
class C2 extends { foo: string; } { } // error
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS9002: Only type references are currently supported in a class 'extends' clauses.
|
|
~
|
|
!!! error TS1005: ',' expected.
|
|
|
|
class C6 extends []{ } // error
|
|
~~
|
|
!!! error TS9002: Only type references are currently supported in a class 'extends' clauses. |