mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
599 B
Plaintext
17 lines
599 B
Plaintext
genericGetter2.ts(4,5): error TS2564: Property 'data' has no initializer and is not definitely assigned in the constructor.
|
|
genericGetter2.ts(5,14): error TS2314: Generic type 'A<T>' requires 1 type argument(s).
|
|
|
|
|
|
==== genericGetter2.ts (2 errors) ====
|
|
class A<T> { }
|
|
|
|
class C<T> {
|
|
data: A<T>;
|
|
~~~~
|
|
!!! error TS2564: Property 'data' has no initializer and is not definitely assigned in the constructor.
|
|
get x(): A {
|
|
~
|
|
!!! error TS2314: Generic type 'A<T>' requires 1 type argument(s).
|
|
return this.data;
|
|
}
|
|
} |