* parenthesize export assignments if needed * Add default-specific parenthesization to handle lookahead * New parenthesization logic for export default * Handle commalist and comma cases
36 lines
700 B
TypeScript
36 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;
|