mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
620 B
TypeScript
26 lines
620 B
TypeScript
//// [tests/cases/conformance/salsa/deepElementAccessExpressionInJS.ts] ////
|
|
|
|
//// [declarations.d.ts]
|
|
declare var module: {
|
|
exports: {
|
|
[key: string]: any;
|
|
};
|
|
}
|
|
//// [elementAccessExpressionInJS.js]
|
|
if (module[calculatePropertyName(1)]) {
|
|
}
|
|
function calculatePropertyName(index) {
|
|
// this would be some webpack index in real life
|
|
return `property${index}`;
|
|
}
|
|
|
|
|
|
//// [elementAccessExpressionInJS.js]
|
|
"use strict";
|
|
if (module[calculatePropertyName(1)]) {
|
|
}
|
|
function calculatePropertyName(index) {
|
|
// this would be some webpack index in real life
|
|
return `property${index}`;
|
|
}
|