mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
405 B
TypeScript
17 lines
405 B
TypeScript
//// [tests/cases/compiler/commaOperatorInConditionalExpression.ts] ////
|
|
|
|
//// [commaOperatorInConditionalExpression.ts]
|
|
function f (m: string) {
|
|
[1, 2, 3].map(i => {
|
|
return true? { [m]: i } : { [m]: i + 1 }
|
|
})
|
|
}
|
|
|
|
//// [commaOperatorInConditionalExpression.js]
|
|
"use strict";
|
|
function f(m) {
|
|
[1, 2, 3].map(i => {
|
|
return true ? { [m]: i } : { [m]: i + 1 };
|
|
});
|
|
}
|