TypeScript (AltJS): デバッグコンソールにトレース出力

snippet-console.ts

class SnippetConsole {
    recentMessage : string;
    constructor() {
        console.log("constructor");
    }
    log(message:string) {
        console.log(message);
        this.recentMessage = message;
        
        console.log(3);
    }
}

var snippet = new SnippetConsole();
snippet.log("hello world.");

(変換後) snippet-console.js

var SnippetConsole = (function () {
    function SnippetConsole() {
        console.log("constructor");
    }
    SnippetConsole.prototype.log = function (message) {
        console.log(message);
        this.recentMessage = message;

        console.log(3);
    };
    return SnippetConsole;
})();

var snippet = new SnippetConsole();
snippet.log("hello world.");

出力:

constructor
hello world.
3