UNPKG

@polkadot/dev

Version:

A collection of shared CI scripts and development environment used by @polkadot projects

37 lines (36 loc) 947 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Clazz = void 0; class Clazz { #something = 123_456_789; and; static staticProperty = 'foobar'; static staticFunction = () => Clazz.staticProperty; /** * @param and the number we should and with */ constructor(and) { this.and = and; this.#something = this.#something & and; } get something() { return this.#something; } async doAsync() { const res = await new Promise((resolve) => resolve(true)); console.log(res); return res; } /** * @description Sets something to something * @param something The addition */ setSomething = (something) => { this.#something = (something ?? 123_456) & this.and; return this.#something; }; toString() { return `something=${this.#something}`; } } exports.Clazz = Clazz;