JSFiddle - React, Tailwind, and code Playground

JavaScript

var Widget = (function () {
    function Widget() {
        this.pok = 'pok';
    }
    Widget.prototype.puk = function () {
        perd.bind(this)();
    };
    function perd() {
        alert('puk');
    };
    return Widget;
}());
var w = new Widget();
w.perd();