mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
770 B
Plaintext
20 lines
770 B
Plaintext
declarationEmitExpressionInExtends2.ts(2,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
declarationEmitExpressionInExtends2.ts(3,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
|
|
|
|
==== declarationEmitExpressionInExtends2.ts (2 errors) ====
|
|
class C<T, U> {
|
|
x: T;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
y: U;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
function getClass<T>(c: T) {
|
|
return C;
|
|
}
|
|
|
|
class MyClass extends getClass(2) <string, number> {
|
|
} |