Advertisement
Guest User

cs2js

a guest
May 27th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.   var X, Y, x, y,
  3.     __hasProp = {}.hasOwnProperty,
  4.     __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
  5.  
  6.   X = (function() {
  7.     function X(a, b) {
  8.       console.log(123);
  9.     }
  10.  
  11.     X.prototype.method = function(c, d) {
  12.       return console.log(c, d);
  13.     };
  14.  
  15.     return X;
  16.  
  17.   })();
  18.  
  19.   Y = (function(_super) {
  20.     __extends(Y, _super);
  21.  
  22.     function Y() {
  23.       Y.__super__.constructor.apply(this, arguments);
  24.       console.log(321);
  25.     }
  26.  
  27.     Y.prototype.method = function() {
  28.       return console.log('a', 'b');
  29.     };
  30.  
  31.     return Y;
  32.  
  33.   })(X);
  34.  
  35.   y = new Y();
  36.  
  37.   x = new X();
  38.  
  39. }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement