UNPKG

@awayfl/avm2

Version:

Virtual machine for executing AS3 code

33 lines (32 loc) 1.01 kB
var ParameterInfo = /** @class */ (function () { function ParameterInfo(abc, typeName) { this.abc = abc; this.typeName = typeName; this.optionalValueKind = -1; this.optionalValueIndex = -1; } ParameterInfo.prototype.hasOptionalValue = function () { return this.optionalValueKind >= 0; }; ParameterInfo.prototype.getOptionalValue = function () { return this.abc.getConstant(this.optionalValueKind, this.optionalValueIndex); }; ParameterInfo.prototype.toString = function () { var str = ''; if (this.name) { str += this.name; } else { str += '?'; } if (this.typeName) { str += ': ' + this.typeName.name; } if (this.optionalValueKind >= 0) { str += ' = ' + this.abc.getConstant(this.optionalValueKind, this.optionalValueIndex); } return str; }; return ParameterInfo; }()); export { ParameterInfo };