/**
 * @fileoverview added by tsickle
 * Generated from: lib/util.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { __awaiter, __extends, __generator } from "tslib";
import { AbstractVariable } from '@iotize/tap/data';
/**
 * @param {?} ms
 * @return {?}
 * @this {*}
 */
export function sleep(ms) {
    return __awaiter(this, void 0, void 0, function () {
        return __generator(this, function (_a) {
            return [2 /*return*/, new Promise((/**
                 * @param {?} resolve
                 * @return {?}
                 */
                function (resolve) { return setTimeout((/**
                 * @return {?}
                 */
                function () { return resolve(); }), ms); }))];
        });
    });
}
var VariableInteractionTesting = /** @class */ (function (_super) {
    __extends(VariableInteractionTesting, _super);
    function VariableInteractionTesting(options) {
        var _this = _super.call(this) || this;
        _this.options = options;
        _this._rawValue = Uint8Array.from([0]);
        return _this;
    }
    Object.defineProperty(VariableInteractionTesting.prototype, "id", {
        get: /**
         * @return {?}
         */
        function () {
            var _a;
            return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.identifier) || 'Unamed variable';
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    VariableInteractionTesting.prototype.readRawInner = /**
     * @return {?}
     */
    function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this._rawValue];
            });
        });
    };
    /**
     * @param {?} value
     * @return {?}
     */
    VariableInteractionTesting.prototype.writeRaw = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this._rawValue = value;
                return [2 /*return*/];
            });
        });
    };
    return VariableInteractionTesting;
}(AbstractVariable));
export { VariableInteractionTesting };
if (false) {
    /**
     * @type {?}
     * @private
     */
    VariableInteractionTesting.prototype._rawValue;
    /** @type {?} */
    VariableInteractionTesting.prototype.converter;
    /** @type {?} */
    VariableInteractionTesting.prototype.options;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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