I am relatively new to both Javascript and Typescript. I have been tasked with converting Javascript code to Typescript. I have come across a Module pattern that seems to return itself instead of exposing private methods and properties (please correct me if I'm mistaken). I'm not sure how to approach this situation.
var MySocket = (function () {
function MySocket(location, openCallback, closeCallback, errorCallback) {
//Code Goes Here
}
MySocket.prototype.Open = function () {
//Code Goes Here
}
MySocket.prototype.Close = function () {
//Code Goes Here
}
return MySocket;
})();