ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
48 lines (47 loc) • 2.25 kB
JavaScript
;
var __extends = (this && this.__extends)/* istanbul ignore next */ || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate)/* istanbul ignore next */ || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./../../../utils");
var DocumentSpan_1 = require("./DocumentSpan");
var SymbolDisplayPart_1 = require("./SymbolDisplayPart");
var ImplementationLocation = /** @class */ (function (_super) {
__extends(ImplementationLocation, _super);
/**
* @internal
*/
function ImplementationLocation(global, compilerObject) {
return _super.call(this, global, compilerObject) || this;
}
/**
* Gets the kind.
*/
ImplementationLocation.prototype.getKind = function () {
return this.compilerObject.kind;
};
/**
* Gets the display parts.
*/
ImplementationLocation.prototype.getDisplayParts = function () {
return this.compilerObject.displayParts.map(function (p) { return new SymbolDisplayPart_1.SymbolDisplayPart(p); });
};
__decorate([
utils_1.Memoize
], ImplementationLocation.prototype, "getDisplayParts", null);
return ImplementationLocation;
}(DocumentSpan_1.DocumentSpan));
exports.ImplementationLocation = ImplementationLocation;