|
| 1 | +"use strict"; |
| 2 | +var __extends = (this && this.__extends) || (function () { |
| 3 | + var extendStatics = function (d, b) { |
| 4 | + extendStatics = Object.setPrototypeOf || |
| 5 | + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
| 6 | + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
| 7 | + return extendStatics(d, b); |
| 8 | + }; |
| 9 | + return function (d, b) { |
| 10 | + if (typeof b !== "function" && b !== null) |
| 11 | + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
| 12 | + extendStatics(d, b); |
| 13 | + function __() { this.constructor = d; } |
| 14 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 15 | + }; |
| 16 | +})(); |
| 17 | +Object.defineProperty(exports, "__esModule", { value: true }); |
| 18 | +console.log("hello world"); |
| 19 | +var user = /** @class */ (function () { |
| 20 | + function user(email, name) { |
| 21 | + this.coursecontent = 1; |
| 22 | + this.city = "sargodha"; |
| 23 | + this.email = email; |
| 24 | + this.name = name; |
| 25 | + } |
| 26 | + user.prototype.delToken = function () { |
| 27 | + console.log("Tokken deleted"); |
| 28 | + }; |
| 29 | + Object.defineProperty(user.prototype, "getAppleEmail", { |
| 30 | + get: function () { |
| 31 | + return "your email is ".concat(this.email); |
| 32 | + }, |
| 33 | + enumerable: false, |
| 34 | + configurable: true |
| 35 | + }); |
| 36 | + Object.defineProperty(user.prototype, "getCourseContent", { |
| 37 | + get: function () { |
| 38 | + return this.coursecontent; |
| 39 | + }, |
| 40 | + enumerable: false, |
| 41 | + configurable: true |
| 42 | + }); |
| 43 | + Object.defineProperty(user.prototype, "courseContent", { |
| 44 | + set: function (courseNum) { |
| 45 | + if (courseNum <= 1) { |
| 46 | + throw new Error("course count should be more than 1"); |
| 47 | + } |
| 48 | + this.coursecontent = courseNum; |
| 49 | + }, |
| 50 | + enumerable: false, |
| 51 | + configurable: true |
| 52 | + }); |
| 53 | + return user; |
| 54 | +}()); |
| 55 | +var subuser = /** @class */ (function (_super) { |
| 56 | + __extends(subuser, _super); |
| 57 | + function subuser() { |
| 58 | + var _this = _super !== null && _super.apply(this, arguments) || this; |
| 59 | + _this.isFamily = true; |
| 60 | + return _this; |
| 61 | + } |
| 62 | + subuser.prototype.changeCourseContent = function () { |
| 63 | + this.courseContent = 4; |
| 64 | + }; |
| 65 | + return subuser; |
| 66 | +}(user)); |
| 67 | +var waseem = new user("mw@gmail.com", "waseemakram"); |
0 commit comments