mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
941 B
Plaintext
19 lines
941 B
Plaintext
emitCapturingThisInTupleDestructuring2.ts(4,5): error TS2564: Property 'test' has no initializer and is not definitely assigned in the constructor.
|
|
emitCapturingThisInTupleDestructuring2.ts(8,39): error TS2493: Tuple type '[number, number]' of length '2' has no element at index '2'.
|
|
|
|
|
|
==== emitCapturingThisInTupleDestructuring2.ts (2 errors) ====
|
|
var array1: [number, number] = [1, 2];
|
|
|
|
class B {
|
|
test: number;
|
|
~~~~
|
|
!!! error TS2564: Property 'test' has no initializer and is not definitely assigned in the constructor.
|
|
test1: any;
|
|
test2: any;
|
|
method() {
|
|
() => [this.test, this.test1, this.test2] = array1; // even though there is a compiler error, we should still emit lexical capture for "this"
|
|
~~~~~~~~~~
|
|
!!! error TS2493: Tuple type '[number, number]' of length '2' has no element at index '2'.
|
|
}
|
|
} |