mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
569 B
TypeScript
14 lines
569 B
TypeScript
//// [tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts] ////
|
|
|
|
//// [emitCapturingThisInTupleDestructuring1.ts]
|
|
declare function wrapper(x: any);
|
|
wrapper((array: [any]) => {
|
|
[this.test, this.test1, this.test2] = array; // even though there is a compiler error, we should still emit lexical capture for "this"
|
|
});
|
|
|
|
//// [emitCapturingThisInTupleDestructuring1.js]
|
|
"use strict";
|
|
wrapper((array) => {
|
|
[this.test, this.test1, this.test2] = array; // even though there is a compiler error, we should still emit lexical capture for "this"
|
|
});
|