dgeni-packages
Version:
A collection of dgeni packages for generating documentation from source code
25 lines • 963 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Host = void 0;
const typescript_1 = require("typescript");
const TsParser_1 = require("../TsParser");
/**
* Host that will be used for TypeScript AST operations that should be configurable or shared
* across multiple doc types.
*/
class Host {
constructor() {
/** Whether multiple leading comments for a TypeScript node should be concatenated. */
this.concatMultipleLeadingComments = true;
/** Flags that will be used to format a Type into a string representation. */
this.typeFormatFlags = typescript_1.TypeFormatFlags.None;
}
getContent(declaration) {
return (0, TsParser_1.getContent)(declaration, this.concatMultipleLeadingComments);
}
typeToString(typeChecker, type) {
return typeChecker.typeToString(type, undefined, this.typeFormatFlags);
}
}
exports.Host = Host;
//# sourceMappingURL=host.js.map