Skip to content

Instantly share code, notes, and snippets.

@odinserj
Forked from mvasilkov/foo.js
Created October 2, 2012 16:11
Show Gist options
  • Save odinserj/3820480 to your computer and use it in GitHub Desktop.
Save odinserj/3820480 to your computer and use it in GitHub Desktop.
TypeScript as a JS pretty print tool
/* Original code */
var s = 'foo.bar', im = new Image
im.src = s; s = im.src
console.log(s)
/* TypeScript output */
var s = 'foo.bar';
var im = new Image();
im.src = s;
s = im.src;
console.log(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment