UNPKG

molstar

Version:

A comprehensive macromolecular library.

48 lines (47 loc) 1.57 kB
"use strict"; /* * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * from https://github.com/dsehnal/CIFTools.js * @author David Sehnal <david.sehnal@gmail.com> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ReaderResult = void 0; var ReaderResult; (function (ReaderResult) { function error(message, line) { if (line === void 0) { line = -1; } return new Error(message, line); } ReaderResult.error = error; function success(result, warnings) { if (warnings === void 0) { warnings = []; } return new Success(result, warnings); } ReaderResult.success = success; var Error = /** @class */ (function () { function Error(message, line) { this.message = message; this.line = line; this.isError = true; } Error.prototype.toString = function () { if (this.line >= 0) { return "[Line ".concat(this.line, "] ").concat(this.message); } return this.message; }; return Error; }()); ReaderResult.Error = Error; var Success = /** @class */ (function () { function Success(result, warnings) { this.result = result; this.warnings = warnings; this.isError = false; } return Success; }()); ReaderResult.Success = Success; })(ReaderResult || (ReaderResult = {})); exports.ReaderResult = ReaderResult;