yadop
Version:
Yet another Doc Parser
85 lines (84 loc) • 2.75 kB
TypeScript
import * as doctrine from 'doctrine';
import { Module } from '../model/module';
import { Entity } from '../model/entity';
import { Method } from '../model/method';
/** Ngdoc comments mapper. */
declare class NgdocMapper {
/**
* Maps the comments to a workable output.
* @param comments The comments.
*/
map(comments: doctrine.Annotation[]): Module[];
/**
* Gets all the entities for the given module.
* @param {doctrine.Annotation[]} comments The comments.
* @param {Module} module The module.
* @returns {Entity[]} entities The entities.
*/
getEntities: (comments: doctrine.Annotation[], module: Module) => Entity[];
/**
* Gets all the methods for the given entity.
* @param {doctrine.Annotation[]} comments The comments.
* @param {Entity} entity The entity.
* @returns {Method[]} methods The methods.
*/
getMethods: (comments: doctrine.Annotation[], entity: Entity) => Method[];
/**
* Gets all the modules.
* @param {doctrine.Annotation[]} comments The comments.
* @returns {Module[]} modules The modules.
*/
getModules: (comments: doctrine.Annotation[]) => Module[];
/**
* Gets the return if present.
* @param {doctrine.Annotation} comment The entity.
* @return {AttributeType} returnType The returnType.
* @private
*/
private _getReturn;
/**
* Gets the deprecated tag if present.
* @param {doctrine.Annotation} comment The entity.
* @return {doctrine.Tag} tag The tag.
* @private
*/
private _getDeprecated;
private _getDescription;
/**
* Gets all the requires for the given entity.
* @param {doctrine.Annotation} comment The comment.
* @returns {string[]} requires The requires.
*/
private _getRequires;
/**
* Gets all the attributes for the given entity.
* @param {doctrine.Annotation} comment The comment.
* @returns {AttributeType[]} attributes The attributes.
*/
private _getAttributes;
private _getBindings;
private _toAttributeType;
/**
* Converts the given comment to an Entity.
* @param {doctrine.Annotation} comment The entity.
* @return {Entity} entity The entity.
* @private
*/
private _toEntity;
/**
* Converts the given comment to a method.
* @param {doctrine.Annotation} comment The entity.
* @return {Method} method The method.
* @private
*/
private _toMethod;
/**
* Converts the given comment to a Module.
* @param {doctrine.Annotation} comment The comment.
* @return {Module} module The module.
* @private
*/
private _toModule;
private _createYadop;
}
export default NgdocMapper;