ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
39 lines (37 loc) • 1.74 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const manipulation_1 = require("./../../manipulation");
const errors = require("./../../errors");
const common_1 = require("./../common");
const base_1 = require("./../base");
const namespace_1 = require("./../namespace");
const callBaseFill_1 = require("./../callBaseFill");
exports.VariableStatementBase = namespace_1.NamespaceChildableNode(base_1.DocumentationableNode(base_1.AmbientableNode(base_1.ExportableNode(base_1.ModifierableNode(common_1.Node)))));
class VariableStatement extends exports.VariableStatementBase {
/**
* Fills the node from a structure.
* @param structure - Structure to fill.
*/
fill(structure) {
callBaseFill_1.callBaseFill(exports.VariableStatementBase.prototype, this, structure);
if (structure.declarationType != null)
throw new errors.NotImplementedError("Filling variable declaration type not implemented. Please comment on issue #27 if you need this and I will increase the priority.");
if (structure.declarations != null)
throw new errors.NotImplementedError("Filling variable declarations not implemented. Please open an issue if you need this and I will increase the prioirty.");
return this;
}
/**
* Gets the declaration list of variables.
*/
getDeclarationList() {
return this.global.compilerFactory.getNodeFromCompilerNode(this.compilerNode.declarationList, this.sourceFile);
}
/**
* Removes this variable statement.
*/
remove() {
manipulation_1.removeStatementedNodeChild(this);
}
}
exports.VariableStatement = VariableStatement;
//# sourceMappingURL=VariableStatement.js.map