-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.js
42 lines (33 loc) · 1.28 KB
/
classes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
var _something = /*#__PURE__*/_classPrivateFieldLooseKey("something");
// Copyright 2017-2021 @polkadot/dev authors & contributors
// SPDX-License-Identifier: Apache-2.0
export class Testing123 {
constructor(and) {
Object.defineProperty(this, _something, {
writable: true,
value: 123456789
});
this.and = void 0;
this.setSomething = something => {
_classPrivateFieldLooseBase(this, _something)[_something] = something;
return _classPrivateFieldLooseBase(this, _something)[_something];
};
this.and = and;
_classPrivateFieldLooseBase(this, _something)[_something] = _classPrivateFieldLooseBase(this, _something)[_something] & and;
}
get something() {
return _classPrivateFieldLooseBase(this, _something)[_something];
}
async doAsync() {
const res = await new Promise(resolve => resolve(true));
console.log(res);
return res;
}
toString() {
return `something=${_classPrivateFieldLooseBase(this, _something)[_something]}`;
}
}
Testing123.staticProperty = 'babelIsCool';
Testing123.staticFunction = () => Testing123.staticProperty;