Open hstarorg opened 7 years ago
Like these codes:
// lib.js export let c = { name: 'Hello' }; export function ins() { return c.name }; export function reset() { c = { name: 'Hello' }; };
import { c, ins, reset } from './lib'; c.name = '222'; console.log(c); console.log(ins()); reset(); console.log(ins()); console.log(c);
When execute index.js that use babel or TypeScript compiled will print
index.js
{ name: '222' } 222 Hello { name: 'Hello' }
But use traceur, that will print
{ name: '222' } 222 Hello { name: '222' }
Would you tell us, which compiler is compile right?
The expected output is what Babel outputs. Traceur should output the same thing. We have tests for that. What options are you compiling with?
Use the defaults compiling options.
Like these codes:
When execute
index.js
that use babel or TypeScript compiled will printBut use traceur, that will print
Would you tell us, which compiler is compile right?