TypeScript/tests/cases/compiler/exportDefaultParenthesize.ts
Wesley Wigham c2aa13dac5
Parenthesize export assignments if needed (#19590)
* parenthesize export assignments if needed

* Add default-specific parenthesization to handle lookahead

* New parenthesization logic for export default

* Handle commalist and comma cases
2017-10-30 18:23:32 -07:00

37 lines
700 B
TypeScript

// @target: es5
// @module: esnext
// @filename: commalist.ts
export default {
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
['foo'+'']: 42,
};
// @filename: comma.ts
export default {
['foo']: 42
};
// @filename: functionexpression.ts
export default () => 42;