Home Manual Reference Source Test Repository
import AbstractDoc from 'esdoc/src/Doc/AbstractDoc.js'
public class | source

AbstractDoc

Indirect Subclass:

TestFileDoc, TestFileDoc

Abstract Doc Class.

Test:

TODO:

  • rename this class name.

Constructor Summary

Public Constructor
public

constructor(ast: AST, node: ASTNode, pathResolver: PathResolver, commentTags: Tag[])

create instance.

Member Summary

Public Members
public get
Private Members
private

_ast: *

private
private

_node: *

private
private

_value: *

Method Summary

Public Methods
public

for @_content, does not need to use this tag

public

for @_export, does not need to use this tag

public

for @_generator, does not need to use this tag

public

for @_importPath, does not need to use this tag

public

for @_importStyle, does not need to use this tag

public

for @_kind, does not need to use this tag

public

for @_lineNumber, does not need to use this tag

public

for @_longname, does not need to use this tag

public

for @_member.

public

for @_memberof, does not need to use this tag

public

for @_name, does not need to use this tag

public

for @_pseudoExport, does not need to use this tag.

public

for @_static, does not need to use this tag

public

for @_undocument, does not need to use this tag

public

for @_unknown, does not need to use this tag

public

for @_variation

public

for @abstract.

public

for @access, @public, @private, @protected

public

for @deprecated

public

for @desc

public

for @emits.

public

for @example.

public

for @experimental

public

for @ignore.

public

for @listens.

public

for @voerride.

public

for @param.

public

for @private

public

for @property.

public

for @protected

public

for @public

public

for @return, @returns.

public

for @see.

public

for @since

public

for @throws.

public

for @todo.

public

for @type.

public

for @version

Private Methods
private

_apply()

apply doc comment.

private

_find(names: string[]): Tag | null

find last tag.

private

_findAll(names: string[]): Tag[] | null

find all tags.

private

_findAllTagValues(names: string[]): *[] | null

find all tag values.

private

find class in same file, import or external.

private

_findTagValue(names: string[]): * | null

find ta value.

private

flatten member expression property name.

private

resolve long name.

Public Constructors

public constructor(ast: AST, node: ASTNode, pathResolver: PathResolver, commentTags: Tag[]) source

create instance.

Params:

NameTypeAttributeDescription
ast AST

this is AST that contains this doc.

node ASTNode

this is self node.

pathResolver PathResolver

this is file path resolver that contains this doc.

commentTags Tag[]

this is tags that self node has.

Public Members

public get value: DocObject[] source

Private Members

private _ast: * source

private _commentTags: * source

private _node: * source

private _pathResolver: * source

private _value: * source

Public Methods

public ['@_content']() source

for @_content, does not need to use this tag

public ['@_export']() source

for @_export, does not need to use this tag

public ['@_generator']() source

for @_generator, does not need to use this tag

public ['@_importPath']() source

for @_importPath, does not need to use this tag

public ['@_importStyle']() source

for @_importStyle, does not need to use this tag

public ['@_kind']() source

for @_kind, does not need to use this tag

public ['@_lineNumber']() source

for @_lineNumber, does not need to use this tag

public ['@_longname']() source

for @_longname, does not need to use this tag

public ['@_member']() source

for @_member.

public ['@_memberof']() source

for @_memberof, does not need to use this tag

public ['@_name']() source

for @_name, does not need to use this tag

public ['@_pseudoExport']() source

for @_pseudoExport, does not need to use this tag.

public ['@_static']() source

for @_static, does not need to use this tag

public ['@_undocument']() source

for @_undocument, does not need to use this tag

public ['@_unknown']() source

for @_unknown, does not need to use this tag

public ['@_variation']() source

for @_variation

public ['@abstract']() source

for @abstract.

public ['@access']() source

for @access, @public, @private, @protected

public ['@deprecated']() source

for @deprecated

public ['@desc']() source

for @desc

public ['@emits']() source

for @emits.

public ['@example']() source

for @example. possible multi tag.

public ['@experimental']() source

for @experimental

public ['@ignore']() source

for @ignore.

public ['@listens']() source

for @listens.

public ['@override']() source

for @voerride.

public ['@param']() source

for @param.

public ['@private']() source

for @private

public ['@property']() source

for @property.

public ['@protected']() source

for @protected

public ['@public']() source

for @public

public ['@return']() source

for @return, @returns.

public ['@see']() source

for @see. possible multi tag.

public ['@since']() source

for @since

public ['@throws']() source

for @throws.

public ['@todo']() source

for @todo. possible multi tag.

public ['@type']() source

for @type.

public ['@version']() source

for @version

Private Methods

private _apply() source

apply doc comment.

private _find(names: string[]): Tag | null source

find last tag.

Params:

NameTypeAttributeDescription
names string[]

tag names.

Return:

Tag | null

found tag.

private _findAll(names: string[]): Tag[] | null source

find all tags.

Params:

NameTypeAttributeDescription
names string[]

tag names.

Return:

Tag[] | null

found tags.

private _findAllTagValues(names: string[]): *[] | null source

find all tag values.

Params:

NameTypeAttributeDescription
names string[]

tag names.

Return:

*[] | null

found values.

private _findClassLongname(className: string): string source

find class in same file, import or external.

Params:

NameTypeAttributeDescription
className string

target class name.

Return:

string

found class long name.

private _findTagValue(names: string[]): * | null source

find ta value.

Params:

NameTypeAttributeDescription
names string[]

tag names.

Return:

* | null

found value.

private _flattenMemberExpression(node: ASTNode): string source

flatten member expression property name. if node structure is [foo [bar [baz [this] ] ] ], flatten is this.baz.bar.foo

Params:

NameTypeAttributeDescription
node ASTNode

target member expression node.

Return:

string

flatten property.

private _resolveLongname(name: string): string source

resolve long name. if the name relates import path, consider import path.

Params:

NameTypeAttributeDescription
name string

identifier name.

Return:

string

resolved name.