griffe_typedoc
¤
Griffe TypeDoc package.
Signatures for entire TypeScript programs using TypeDoc.
Classes:
-
Accessor–A property accessor with getter and setter signatures.
-
BlockTag–A comment tag and its content.
-
BlockTagContent–A text, code, or inline tag segment in a comment.
-
BlockTagContentKind–Kinds of content in a TypeDoc comment.
-
BlockTagKind–Tags supported in TypeDoc comments.
-
CallSignature–A callable signature with its parameters and return type.
-
Class–A TypeScript class reflection.
-
Comment–A TypeDoc comment with a summary and optional tags.
-
Constructor–A constructor and its signatures.
-
ConstructorSignature–A constructor signature with its parameters.
-
Enum–A TypeScript enum reflection.
-
EnumMember–A member of a TypeScript enum.
-
FileRegistry–Source files and their associated reflections.
-
Function–A TypeScript function and its call signatures.
-
GetSignature–A getter signature.
-
Group–A named group of reflections.
-
IndexSignature–An index signature with its parameters and value type.
-
Interface–A TypeScript interface reflection.
-
LogLevel–Enumeration of available log levels.
-
Method–A TypeScript method and its call signatures.
-
Module–A TypeScript module reflection.
-
Namespace–A TypeScript namespace reflection.
-
Parameter–A parameter in a callable signature.
-
Project–The root reflection of a TypeDoc project.
-
Property–A TypeScript property reflection.
-
Reference–A reflection that refers to another reflection by ID.
-
Reflection–Base model for a TypeDoc reflection.
-
ReflectionKind–Kinds of TypeDoc reflections.
-
SetSignature–A setter signature with its parameters.
-
Source–The source location of a reflection.
-
Target–A reference target identified by its source file and qualified name.
-
Type–A TypeScript type and the details associated with its kind.
-
TypeAlias–A TypeScript type alias reflection.
-
TypeKind–Kinds of TypeScript types represented by TypeDoc.
-
TypeLiteral–A type literal with its members and signatures.
-
TypeParameter–A generic type parameter with an optional constraint and default.
-
TypedocDecoder–JSON decoder.
-
Variable–A TypeScript variable reflection.
Functions:
-
get_logger–Create and return a new logger instance.
-
get_parser–Return the CLI argument parser.
-
load–Load TypeScript API data using TypeDoc.
-
main–Run the main program.
-
patch_loggers–Patch loggers.
Accessor
dataclass
¤
Accessor(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
get_signature: GetSignature | None = None,
set_signature: SetSignature | None = None,
overwrites: Type | None = None,
implementation_of: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A property accessor with getter and setter signatures.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
get_signature(GetSignature | None) –Getter signature of the accessor.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
set_signature(SetSignature | None) –Setter signature of the accessor.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
get_signature
class-attribute
instance-attribute
¤
get_signature: GetSignature | None = None
Getter signature of the accessor.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
set_signature
class-attribute
instance-attribute
¤
set_signature: SetSignature | None = None
Setter signature of the accessor.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
BlockTag
dataclass
¤
BlockTag(
*, kind: BlockTagKind, content: list[BlockTagContent]
)
A comment tag and its content.
Methods:
-
markdown–Render tag content as Markdown.
Attributes:
-
content(list[BlockTagContent]) –Content segments of the tag.
-
kind(BlockTagKind) –Kind of comment tag.
markdown
¤
Render tag content as Markdown.
Parameters:
-
(**kwargs¤Any, default:{}) –Keyword arguments passed to each content segment's
markdownmethod.
Returns:
-
str–The rendered content segments joined together.
Source code in src/griffe_typedoc/_internal/models.py
336 337 338 339 340 341 342 343 344 345 | |
BlockTagContent
dataclass
¤
BlockTagContent(
*,
kind: BlockTagContentKind,
text: str,
target: int | str | None = None,
ts_link_text: str | None = None,
)
A text, code, or inline tag segment in a comment.
Methods:
-
markdown–Render the content segment as Markdown.
Attributes:
-
kind(BlockTagContentKind) –Kind of comment content.
-
target(int | str | None) –Reflection ID or URL targeted by an inline link.
-
text(str) –Text of the content segment.
-
ts_link_text(str | None) –Link text supplied in the TypeScript comment.
target
class-attribute
instance-attribute
¤
Reflection ID or URL targeted by an inline link.
ts_link_text
class-attribute
instance-attribute
¤
ts_link_text: str | None = None
Link text supplied in the TypeScript comment.
markdown
¤
markdown(
symbol_map: dict[int, Reflection] | None = None,
) -> str
Render the content segment as Markdown.
Parameters:
-
(symbol_map¤dict[int, Reflection] | None, default:None) –Reflections indexed by ID, used to resolve internal links.
Returns:
-
str–Text, a Markdown link, or an autoref element for a resolved internal link.
Source code in src/griffe_typedoc/_internal/models.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
BlockTagContentKind
¤
Bases: Enum
Kinds of content in a TypeDoc comment.
Attributes:
-
CODE–Code content.
-
INLINE_TAG–An inline comment tag.
-
TEXT–Plain text content.
BlockTagKind
¤
Bases: Enum
Tags supported in TypeDoc comments.
Attributes:
-
ALPHA–The
@alphacomment tag. -
BETA–The
@betacomment tag. -
CATEGORY–The
@categorycomment tag. -
DEFAULT_VALUE–The
@defaultValuecomment tag. -
DEPRECATED–The
@deprecatedcomment tag. -
ENUM–The
@enumcomment tag. -
EVENT–The
@eventcomment tag. -
EVENT_PROPERTY–The
@eventPropertycomment tag. -
EXAMPLE–The
@examplecomment tag. -
EXPERIMENTAL–The
@experimentalcomment tag. -
GROUP–The
@groupcomment tag. -
HIDDEN–The
@hiddencomment tag. -
IGNORE–The
@ignorecomment tag. -
INHERIT_DOC–The
@inheritDoccomment tag. -
INTERFACE–The
@interfacecomment tag. -
INTERNAL–The
@internalcomment tag. -
LABEL–The
@labelcomment tag. -
LINK–The
@linkcomment tag. -
MODULE–The
@modulecomment tag. -
NAMESPACE–The
@namespacecomment tag. -
OVERLOAD–The
@overloadcomment tag. -
OVERRIDE–The
@overridecomment tag. -
PACKAGE_DOCUMENTATION–The
@packageDocumentationcomment tag. -
PARAM–The
@paramcomment tag. -
PRIVATE–The
@privatecomment tag. -
PRIVATE_REMARKS–The
@privateRemarkscomment tag. -
PROPERTY–The
@propertycomment tag. -
PROTECTED–The
@protectedcomment tag. -
PUBLIC–The
@publiccomment tag. -
READONLY–The
@readonlycomment tag. -
REMARKS–The
@remarkscomment tag. -
RETURNS–The
@returnscomment tag. -
SATISFIES–The
@satisfiescomment tag. -
SEALED–The
@sealedcomment tag. -
SEE–The
@seecomment tag. -
TEMPLATE–The
@templatecomment tag. -
THROWS–The
@throwscomment tag. -
TYPE_PARAM–The
@typeParamcomment tag. -
VIRTUAL–The
@virtualcomment tag.
DEFAULT_VALUE
class-attribute
instance-attribute
¤
DEFAULT_VALUE = '@defaultValue'
The @defaultValue comment tag.
DEPRECATED
class-attribute
instance-attribute
¤
DEPRECATED = '@deprecated'
The @deprecated comment tag.
EVENT_PROPERTY
class-attribute
instance-attribute
¤
EVENT_PROPERTY = '@eventProperty'
The @eventProperty comment tag.
EXPERIMENTAL
class-attribute
instance-attribute
¤
EXPERIMENTAL = '@experimental'
The @experimental comment tag.
INHERIT_DOC
class-attribute
instance-attribute
¤
INHERIT_DOC = '@inheritDoc'
The @inheritDoc comment tag.
PACKAGE_DOCUMENTATION
class-attribute
instance-attribute
¤
PACKAGE_DOCUMENTATION = '@packageDocumentation'
The @packageDocumentation comment tag.
PRIVATE_REMARKS
class-attribute
instance-attribute
¤
PRIVATE_REMARKS = '@privateRemarks'
The @privateRemarks comment tag.
TYPE_PARAM
class-attribute
instance-attribute
¤
TYPE_PARAM = '@typeParam'
The @typeParam comment tag.
CallSignature
dataclass
¤
CallSignature(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type,
parameters: list[Parameter] | None = None,
type_parameters: list[TypeParameter] | None = None,
overwrites: Type | None = None,
implementation_of: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A callable signature with its parameters and return type.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parameters(list[Parameter] | None) –Parameters of the signature.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type) –Return type of the signature.
-
type_parameters(list[TypeParameter] | None) –Generic type parameters of the declaration.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parameters
class-attribute
instance-attribute
¤
Parameters of the signature.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
type_parameters
class-attribute
instance-attribute
¤
type_parameters: list[TypeParameter] | None = None
Generic type parameters of the declaration.
Class
dataclass
¤
Class(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
extended_types: list[Type] | None = None,
extended_by: list[Type] | None = None,
implemented_types: list[Type] | None = None,
index_signatures: list[IndexSignature] | None = None,
type_parameters: list[TypeParameter] | None = None,
)
Bases: Reflection
A TypeScript class reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
extended_by(list[Type] | None) –Types that extend the declaration.
-
extended_types(list[Type] | None) –Types extended by the declaration.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implemented_types(list[Type] | None) –Interfaces implemented by the class.
-
index_signatures(list[IndexSignature] | None) –Index signatures of the declaration.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
type_parameters(list[TypeParameter] | None) –Generic type parameters of the declaration.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
extended_by
class-attribute
instance-attribute
¤
Types that extend the declaration.
extended_types
class-attribute
instance-attribute
¤
Types extended by the declaration.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implemented_types
class-attribute
instance-attribute
¤
Interfaces implemented by the class.
index_signatures
class-attribute
instance-attribute
¤
index_signatures: list[IndexSignature] | None = None
Index signatures of the declaration.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
type
class-attribute
instance-attribute
¤
type: Type | None = None
Type associated with the reflection.
type_parameters
class-attribute
instance-attribute
¤
type_parameters: list[TypeParameter] | None = None
Generic type parameters of the declaration.
Comment
dataclass
¤
Comment(
*,
summary: list[BlockTagContent],
tags: list[BlockTag] | None = None,
block_tags: list[BlockTag] | None = None,
)
A TypeDoc comment with a summary and optional tags.
-
griffe_typedoc-
Accessorcomment -
CallSignaturecomment -
Classcomment -
Constructorcomment -
ConstructorSignaturecomment -
Enumcomment -
EnumMembercomment -
Functioncomment -
GetSignaturecomment -
IndexSignaturecomment -
Interfacecomment -
Methodcomment -
Modulecomment -
Namespacecomment -
Parametercomment -
Projectcomment -
Propertycomment -
Referencecomment -
Reflectioncomment -
SetSignaturecomment -
TypeAliascomment -
TypeLiteralcomment -
TypeParametercomment -
Variablecomment
-
Methods:
-
markdown–Render the comment summary as Markdown.
Attributes:
-
block_tags(list[BlockTag] | None) –Block tags associated with the comment.
-
summary(list[BlockTagContent]) –Content segments of the comment summary.
-
tags(list[BlockTag] | None) –Tags associated with the comment.
block_tags
class-attribute
instance-attribute
¤
Block tags associated with the comment.
summary
instance-attribute
¤
summary: list[BlockTagContent]
Content segments of the comment summary.
tags
class-attribute
instance-attribute
¤
Tags associated with the comment.
markdown
¤
Render the comment summary as Markdown.
Parameters:
-
(**kwargs¤Any, default:{}) –Keyword arguments passed to each content segment's
markdownmethod.
Returns:
-
str–The rendered summary segments joined together.
Source code in src/griffe_typedoc/_internal/models.py
362 363 364 365 366 367 368 369 370 371 | |
Constructor
dataclass
¤
Constructor(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
signatures: list[ConstructorSignature] | None = None,
overwrites: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A constructor and its signatures.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
signatures(list[ConstructorSignature] | None) –Callable signatures of the reflection.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
signatures
class-attribute
instance-attribute
¤
signatures: list[ConstructorSignature] | None = None
Callable signatures of the reflection.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
ConstructorSignature
dataclass
¤
ConstructorSignature(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
parameters: list[Parameter] | None = None,
overwrites: Type | None = None,
inherited_from: Type | None = None,
type_parameters: list[TypeParameter] | None = None,
)
Bases: Reflection
A constructor signature with its parameters.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parameters(list[Parameter] | None) –Parameters of the signature.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
type_parameters(list[TypeParameter] | None) –Generic type parameters of the declaration.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parameters
class-attribute
instance-attribute
¤
Parameters of the signature.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
type
class-attribute
instance-attribute
¤
type: Type | None = None
Type associated with the reflection.
type_parameters
class-attribute
instance-attribute
¤
type_parameters: list[TypeParameter] | None = None
Generic type parameters of the declaration.
Enum
dataclass
¤
Enum(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
)
Bases: Reflection
A TypeScript enum reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
EnumMember
dataclass
¤
EnumMember(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
)
Bases: Reflection
A member of a TypeScript enum.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
FileRegistry
dataclass
¤
Source files and their associated reflections.
Methods:
-
filepath–Return the file path associated with a reflection ID.
Attributes:
-
entries(dict[int, str]) –File paths indexed by file ID.
-
reflections(dict[int, int]) –Reflection IDs indexed by file ID.
-
reverse_reflections(dict[int, int]) –File IDs indexed by reflection ID.
reverse_reflections
cached
property
¤
File IDs indexed by reflection ID.
filepath
¤
filepath(reflection_id: int) -> str
Return the file path associated with a reflection ID.
Parameters:
Returns:
-
str–The registered file path.
Raises:
-
KeyError–If the reflection or file ID is not registered.
Source code in src/griffe_typedoc/_internal/models.py
277 278 279 280 281 282 283 284 285 286 287 288 289 | |
Function
dataclass
¤
Function(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
signatures: list[CallSignature],
)
Bases: Reflection
A TypeScript function and its call signatures.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
exports(list[Reflection]) –References to properties of the first signature's return type declaration.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
signatures(list[CallSignature]) –Callable signatures of the reflection.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
exports
property
¤
exports: list[Reflection]
References to properties of the first signature's return type declaration.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
signatures
instance-attribute
¤
signatures: list[CallSignature]
Callable signatures of the reflection.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
GetSignature
dataclass
¤
GetSignature(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
overwrites: Type | None = None,
implementation_of: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A getter signature.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Group
dataclass
¤
Group(*, title: str, children: list[int | Reflection])
A named group of reflections.
Attributes:
IndexSignature
dataclass
¤
IndexSignature(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type,
parameters: list[Parameter] | None = None,
)
Bases: Reflection
An index signature with its parameters and value type.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parameters(list[Parameter] | None) –Parameters of the signature.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type) –Value type of the index signature.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parameters
class-attribute
instance-attribute
¤
Parameters of the signature.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Interface
dataclass
¤
Interface(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
extended_types: list[Type] | None = None,
extended_by: list[Type] | None = None,
type_parameters: list[TypeParameter] | None = None,
index_signature: IndexSignature | None = None,
implemented_by: list[Type] | None = None,
index_signatures: list[IndexSignature] | None = None,
signatures: list[CallSignature] | None = None,
)
Bases: Reflection
A TypeScript interface reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
extended_by(list[Type] | None) –Types that extend the declaration.
-
extended_types(list[Type] | None) –Types extended by the declaration.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implemented_by(list[Type] | None) –Types that implement the declaration.
-
index_signature(IndexSignature | None) –Index signature of the interface.
-
index_signatures(list[IndexSignature] | None) –Index signatures of the declaration.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
signatures(list[CallSignature] | None) –Callable signatures of the reflection.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
type_parameters(list[TypeParameter] | None) –Generic type parameters of the declaration.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
extended_by
class-attribute
instance-attribute
¤
Types that extend the declaration.
extended_types
class-attribute
instance-attribute
¤
Types extended by the declaration.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implemented_by
class-attribute
instance-attribute
¤
Types that implement the declaration.
index_signature
class-attribute
instance-attribute
¤
index_signature: IndexSignature | None = None
Index signature of the interface.
index_signatures
class-attribute
instance-attribute
¤
index_signatures: list[IndexSignature] | None = None
Index signatures of the declaration.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
signatures
class-attribute
instance-attribute
¤
signatures: list[CallSignature] | None = None
Callable signatures of the reflection.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
type
class-attribute
instance-attribute
¤
type: Type | None = None
Type associated with the reflection.
type_parameters
class-attribute
instance-attribute
¤
type_parameters: list[TypeParameter] | None = None
Generic type parameters of the declaration.
LogLevel
¤
Bases: Enum
Enumeration of available log levels.
Attributes:
-
critical–Critical error messages.
-
debug–Debugging messages.
-
error–Error messages.
-
info–Informational messages.
-
success–Messages reporting successful operations.
-
trace–Detailed tracing messages.
-
warning–Warning messages.
success
class-attribute
instance-attribute
¤
success = 'success'
Messages reporting successful operations.
Method
dataclass
¤
Method(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
signatures: list[CallSignature],
overwrites: Type | None = None,
implementation_of: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A TypeScript method and its call signatures.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
signatures(list[CallSignature]) –Callable signatures of the reflection.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
signatures
instance-attribute
¤
signatures: list[CallSignature]
Callable signatures of the reflection.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Module
dataclass
¤
Module(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
package_version: str | None = None,
readme: str | None = None,
)
Bases: Reflection
A TypeScript module reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
exports(list[Reflection]) –Reflections exported by the module through an
export=function, or an empty list. -
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
package_version(str | None) –Version of the documented package.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
readme(str | None) –README content associated with the reflection.
-
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
exports
property
¤
exports: list[Reflection]
Reflections exported by the module through an export= function, or an empty list.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
package_version
class-attribute
instance-attribute
¤
package_version: str | None = None
Version of the documented package.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
readme
class-attribute
instance-attribute
¤
readme: str | None = None
README content associated with the reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Namespace
dataclass
¤
Namespace(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
)
Bases: Reflection
A TypeScript namespace reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Parameter
dataclass
¤
Parameter(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
default_value: str | None = None,
)
Bases: Reflection
A parameter in a callable signature.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
default_value(str | None) –Default value as TypeScript source text.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type of the parameter.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
default_value
class-attribute
instance-attribute
¤
default_value: str | None = None
Default value as TypeScript source text.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Project
dataclass
¤
Project(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
package_name: str,
readme: list[BlockTagContent] | None = None,
symbol_id_map: dict[int, Reflection] = dict(),
package_version: str | None = None,
files: FileRegistry | None = None,
)
Bases: Reflection
The root reflection of a TypeDoc project.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
files(FileRegistry | None) –Registry of source files in the project.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
package_name(str) –Name of the documented package.
-
package_version(str | None) –Version of the documented package.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
readme(list[BlockTagContent] | None) –README content associated with the reflection.
-
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_id_map(dict[int, Reflection]) –Reflections indexed by ID.
-
symbol_map(dict[int, Reflection]) –Project reflections indexed by ID.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
files
class-attribute
instance-attribute
¤
files: FileRegistry | None = None
Registry of source files in the project.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
package_version
class-attribute
instance-attribute
¤
package_version: str | None = None
Version of the documented package.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
readme
class-attribute
instance-attribute
¤
readme: list[BlockTagContent] | None = None
README content associated with the reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_id_map
class-attribute
instance-attribute
¤
symbol_id_map: dict[int, Reflection] = field(
default_factory=dict, repr=False
)
Reflections indexed by ID.
Property
dataclass
¤
Property(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type,
inherited_from: Type | None = None,
overwrites: Type | None = None,
default_value: str | None = None,
implementation_of: Type | None = None,
)
Bases: Reflection
A TypeScript property reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
default_value(str | None) –Default value as TypeScript source text.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type) –Type of the property.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
default_value
class-attribute
instance-attribute
¤
default_value: str | None = None
Default value as TypeScript source text.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Reference
dataclass
¤
Reference(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
target: int,
)
Bases: Reflection
A reflection that refers to another reflection by ID.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
target(int) –ID of the referenced reflection.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Reflection
dataclass
¤
Reflection(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
)
Base model for a TypeDoc reflection.
-
griffe_typedoc
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
ReflectionKind
¤
Bases: Enum
Kinds of TypeDoc reflections.
-
griffe_typedoc-
Accessorkind -
CallSignaturekind -
Classkind -
Constructorkind -
ConstructorSignaturekind -
Enumkind -
EnumMemberkind -
Functionkind -
GetSignaturekind -
IndexSignaturekind -
Interfacekind -
Methodkind -
Modulekind -
Namespacekind -
Parameterkind -
Projectkind -
Propertykind -
Referencekind -
Reflectionkind -
ReflectionKindfrom_int -
SetSignaturekind -
TypeAliaskind -
TypeLiteralkind -
TypeParameterkind -
Variablekind
-
Methods:
-
from_int–Convert a TypeDoc reflection kind integer to an enum member.
-
to_int–Return the TypeDoc integer identifying this reflection kind.
Attributes:
-
ACCESSOR–The accessor reflection kind.
-
CALL_SIGNATURE–The call signature reflection kind.
-
CLASS–The class reflection kind.
-
CONSTRUCTOR–The constructor reflection kind.
-
CONSTRUCTOR_SIGNATURE–The constructor signature reflection kind.
-
ENUM–The enum reflection kind.
-
ENUM_MEMBER–The enum member reflection kind.
-
FUNCTION–The function reflection kind.
-
GET_SIGNATURE–The get signature reflection kind.
-
INDEX_SIGNATURE–The index signature reflection kind.
-
INTERFACE–The interface reflection kind.
-
METHOD–The method reflection kind.
-
MODULE–The module reflection kind.
-
NAMESPACE–The namespace reflection kind.
-
PARAMETER–The parameter reflection kind.
-
PROJECT–The project reflection kind.
-
PROPERTY–The property reflection kind.
-
REFERENCE–The reference reflection kind.
-
SET_SIGNATURE–The set signature reflection kind.
-
TYPE_ALIAS–The type alias reflection kind.
-
TYPE_LITERAL–The type literal reflection kind.
-
TYPE_PARAMETER–The type parameter reflection kind.
-
VARIABLE–The variable reflection kind.
CALL_SIGNATURE
class-attribute
instance-attribute
¤
CALL_SIGNATURE = 'call_signature'
The call signature reflection kind.
CONSTRUCTOR
class-attribute
instance-attribute
¤
CONSTRUCTOR = 'constructor'
The constructor reflection kind.
CONSTRUCTOR_SIGNATURE
class-attribute
instance-attribute
¤
CONSTRUCTOR_SIGNATURE = 'constructor_signature'
The constructor signature reflection kind.
ENUM_MEMBER
class-attribute
instance-attribute
¤
ENUM_MEMBER = 'enum_member'
The enum member reflection kind.
GET_SIGNATURE
class-attribute
instance-attribute
¤
GET_SIGNATURE = 'get_signature'
The get signature reflection kind.
INDEX_SIGNATURE
class-attribute
instance-attribute
¤
INDEX_SIGNATURE = 'index_signature'
The index signature reflection kind.
INTERFACE
class-attribute
instance-attribute
¤
INTERFACE = 'interface'
The interface reflection kind.
NAMESPACE
class-attribute
instance-attribute
¤
NAMESPACE = 'namespace'
The namespace reflection kind.
PARAMETER
class-attribute
instance-attribute
¤
PARAMETER = 'parameter'
The parameter reflection kind.
REFERENCE
class-attribute
instance-attribute
¤
REFERENCE = 'reference'
The reference reflection kind.
SET_SIGNATURE
class-attribute
instance-attribute
¤
SET_SIGNATURE = 'set_signature'
The set signature reflection kind.
TYPE_ALIAS
class-attribute
instance-attribute
¤
TYPE_ALIAS = 'type_alias'
The type alias reflection kind.
TYPE_LITERAL
class-attribute
instance-attribute
¤
TYPE_LITERAL = 'type_literal'
The type literal reflection kind.
TYPE_PARAMETER
class-attribute
instance-attribute
¤
TYPE_PARAMETER = 'type_parameter'
The type parameter reflection kind.
from_int
classmethod
¤
from_int(value: int) -> ReflectionKind
Convert a TypeDoc reflection kind integer to an enum member.
Parameters:
Returns:
-
ReflectionKind–The matching reflection kind.
Raises:
-
KeyError–If the integer does not identify a supported kind.
Source code in src/griffe_typedoc/_internal/models.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
to_int
¤
to_int() -> int
Return the TypeDoc integer identifying this reflection kind.
Source code in src/griffe_typedoc/_internal/models.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
SetSignature
dataclass
¤
SetSignature(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
parameters: list[Parameter] | None = None,
overwrites: Type | None = None,
implementation_of: Type | None = None,
inherited_from: Type | None = None,
)
Bases: Reflection
A setter signature with its parameters.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implementation_of(Type | None) –Reference to the declaration that this reflection implements.
-
inherited_from(Type | None) –Reference to the declaration that this reflection inherits.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
overwrites(Type | None) –Reference to the declaration that this reflection overrides.
-
parameters(list[Parameter] | None) –Parameters of the signature.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implementation_of
class-attribute
instance-attribute
¤
implementation_of: Type | None = None
Reference to the declaration that this reflection implements.
inherited_from
class-attribute
instance-attribute
¤
inherited_from: Type | None = None
Reference to the declaration that this reflection inherits.
overwrites
class-attribute
instance-attribute
¤
overwrites: Type | None = None
Reference to the declaration that this reflection overrides.
parameters
class-attribute
instance-attribute
¤
Parameters of the signature.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
Source
dataclass
¤
The source location of a reflection.
-
griffe_typedoc-
Accessorsources -
CallSignaturesources -
Classsources -
Constructorsources -
ConstructorSignaturesources -
Enumsources -
EnumMembersources -
Functionsources -
GetSignaturesources -
IndexSignaturesources -
Interfacesources -
Methodsources -
Modulesources -
Namespacesources -
Parametersources -
Projectsources -
Propertysources -
Referencesources -
Reflectionsources -
SetSignaturesources -
TypeAliassources -
TypeLiteralsources -
TypeParametersources -
Variablesources
-
Attributes:
-
character(int) –Character offset within the source line.
-
contents(str) –Source text at the recorded line number, including its line ending.
-
file_name(str) –Name of the source file.
-
filepath(str) –Path of the source file resolved through the project file registry.
-
line(int) –Source line number, starting at one.
-
url(str | None) –URL of the source location.
Target
dataclass
¤
A reference target identified by its source file and qualified name.
Attributes:
-
qualified_name(str) –Qualified name of the referenced symbol.
-
source_file_name(str) –Source file containing the target.
Type
dataclass
¤
Type(
*,
type: TypeKind,
name: str | None = None,
target: int | Target | None = None,
package: str | None = None,
type_arguments: list[Type] | None = None,
qualified_name: str | None = None,
element_type: Type | None = None,
refers_to_type_parameter: bool | None = None,
value: str | None = None,
types: list[Type] | None = None,
declaration: TypeLiteral | None = None,
elements: list[Type] | None = None,
prefer_values: bool | None = None,
query_type: Type | None = None,
operator: str | None = None,
parameter: str | None = None,
parameter_type: Type | None = None,
template_type: Type | None = None,
)
A TypeScript type and the details associated with its kind.
-
griffe_typedoc-
Accessor -
CallSignature -
Class -
Constructor -
ConstructorSignature -
Enumtype -
EnumMembertype -
Functiontype -
GetSignature -
IndexSignaturetype -
Interface -
Method -
Moduletype -
Namespacetype -
Parametertype -
Projecttype -
Property -
Referencetype -
Reflectiontype -
SetSignature -
Type -
TypeAlias -
TypeLiteraltype -
TypeParameter -
Variabletype
-
Attributes:
-
declaration(TypeLiteral | None) –Declaration of a reflection type.
-
element_type(Type | None) –Element type of an array.
-
elements(list[Type] | None) –Element types of a tuple.
-
name(str | None) –Name of the type, when applicable.
-
operator(str | None) –Operator applied to a type.
-
package(str | None) –Package containing the referenced type.
-
parameter(str | None) –Parameter name in a mapped type.
-
parameter_type(Type | None) –Type of the parameter in a mapped type.
-
prefer_values(bool | None) –Whether the type reference prefers a value target.
-
qualified_name(str | None) –Qualified name of the referenced symbol.
-
query_type(Type | None) –Type referenced by a type query.
-
refers_to_type_parameter(bool | None) –Whether the reference points to a type parameter.
-
target(int | Target | None) –Reflection ID or external symbol targeted by a reference type.
-
template_type(Type | None) –Template type used by a mapped type.
-
type(TypeKind) –Kind of the TypeScript type.
-
type_arguments(list[Type] | None) –Type arguments supplied to a generic type.
-
types(list[Type] | None) –Types in a union or intersection.
-
value(str | None) –Value of a literal type.
declaration
class-attribute
instance-attribute
¤
declaration: TypeLiteral | None = None
Declaration of a reflection type.
element_type
class-attribute
instance-attribute
¤
element_type: Type | None = None
Element type of an array.
elements
class-attribute
instance-attribute
¤
Element types of a tuple.
name
class-attribute
instance-attribute
¤
name: str | None = None
Name of the type, when applicable.
operator
class-attribute
instance-attribute
¤
operator: str | None = None
Operator applied to a type.
package
class-attribute
instance-attribute
¤
package: str | None = None
Package containing the referenced type.
parameter
class-attribute
instance-attribute
¤
parameter: str | None = None
Parameter name in a mapped type.
parameter_type
class-attribute
instance-attribute
¤
parameter_type: Type | None = None
Type of the parameter in a mapped type.
prefer_values
class-attribute
instance-attribute
¤
prefer_values: bool | None = None
Whether the type reference prefers a value target.
qualified_name
class-attribute
instance-attribute
¤
qualified_name: str | None = None
Qualified name of the referenced symbol.
query_type
class-attribute
instance-attribute
¤
query_type: Type | None = None
Type referenced by a type query.
refers_to_type_parameter
class-attribute
instance-attribute
¤
refers_to_type_parameter: bool | None = None
Whether the reference points to a type parameter.
target
class-attribute
instance-attribute
¤
Reflection ID or external symbol targeted by a reference type.
template_type
class-attribute
instance-attribute
¤
template_type: Type | None = None
Template type used by a mapped type.
type_arguments
class-attribute
instance-attribute
¤
Type arguments supplied to a generic type.
types
class-attribute
instance-attribute
¤
Types in a union or intersection.
TypeAlias
dataclass
¤
TypeAlias(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type,
type_parameters: list[TypeParameter] | None = None,
implemented_by: list[Type] | None = None,
)
Bases: Reflection
A TypeScript type alias reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
implemented_by(list[Type] | None) –Types that implement the declaration.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type) –Type represented by the alias.
-
type_parameters(list[TypeParameter] | None) –Generic type parameters of the declaration.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
implemented_by
class-attribute
instance-attribute
¤
Types that implement the declaration.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
type_parameters
class-attribute
instance-attribute
¤
type_parameters: list[TypeParameter] | None = None
Generic type parameters of the declaration.
TypeKind
¤
Bases: Enum
Kinds of TypeScript types represented by TypeDoc.
Attributes:
-
ARRAY–An array type.
-
INTERSECTION–An intersection of types.
-
INTRINSIC–A built-in TypeScript type.
-
LITERAL–A literal value type.
-
MAPPED–A mapped type.
-
OPERATOR–A type operator expression.
-
QUERY–A type query.
-
REFERENCE–A reference to a named type.
-
REFLECTION–A type described by a reflection declaration.
-
TUPLE–A tuple type.
-
UNION–A union of types.
TypeLiteral
dataclass
¤
TypeLiteral(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
signatures: list[CallSignature] | None = None,
index_signatures: list[IndexSignature] | None = None,
)
Bases: Reflection
A type literal with its members and signatures.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
index_signatures(list[IndexSignature] | None) –Index signatures of the declaration.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
signatures(list[CallSignature] | None) –Callable signatures of the reflection.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type associated with the reflection.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
index_signatures
class-attribute
instance-attribute
¤
index_signatures: list[IndexSignature] | None = None
Index signatures of the declaration.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
signatures
class-attribute
instance-attribute
¤
signatures: list[CallSignature] | None = None
Callable signatures of the reflection.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
TypeParameter
dataclass
¤
TypeParameter(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type | None = None,
default: Type | None = None,
)
Bases: Reflection
A generic type parameter with an optional constraint and default.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
default(Type | None) –Default type used when no type argument is supplied.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type | None) –Type constraint of the generic parameter.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
default
class-attribute
instance-attribute
¤
default: Type | None = None
Default type used when no type argument is supplied.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
TypedocDecoder
¤
Bases: JSONDecoder
JSON decoder.
Parameters:
-
(*args¤Any, default:()) –Arguments passed to parent init method.
-
(*kwargs¤Any, default:{}) –Keyword arguments passed to parent init method.
Source code in src/griffe_typedoc/_internal/decoder.py
556 557 558 559 560 561 562 563 564 565 | |
Variable
dataclass
¤
Variable(
*,
id: int,
name: str,
variant: str,
comment: Comment | None = None,
children: list[Reflection] = list(),
flags: dict = dict(),
groups: list[Group] = list(),
sources: list[Source] = list(),
parent: Reflection | None = None,
type: Type,
default_value: str | None = None,
)
Bases: Reflection
A TypeScript variable reflection.
Attributes:
-
children(list[Reflection]) –Child reflections.
-
comment(Comment | None) –Documentation comment associated with the reflection.
-
default_value(str | None) –Default value as TypeScript source text.
-
final_target(Reflection) –Final reflection reached by following reference targets.
-
flags(dict) –Reflection flags recorded by TypeDoc.
-
groups(list[Group]) –Named groups of child reflections.
-
id(int) –Unique reflection ID within the project.
-
kind(ReflectionKind) –Kind of the reflection.
-
name(str) –Name of the reflection.
-
parent(Reflection | None) –Parent reflection, or
Nonefor a root reflection. -
path(str) –Slash-separated symbol path, with
indexmodules omitted. -
resolved_groups(list[Group]) –Groups with child IDs replaced by their reflections.
-
resolved_target(Reflection) –Referenced reflection resolved through the symbol map.
-
root(Reflection) –The root ancestor of the reflection tree.
-
root_module(Reflection) –The highest ancestor below the project, or this reflection if it has no parent.
-
source_contents(str) –Source lines joined together, with trailing whitespace and an opening brace removed.
-
sources(list[Source]) –Source locations of the reflection.
-
symbol_map(dict[int, Reflection]) –Reflections indexed by ID, inherited from the parent when available.
-
type(Type) –Type of the variable.
-
variant(str) –Reflection variant recorded by TypeDoc.
children
class-attribute
instance-attribute
¤
children: list[Reflection] = field(default_factory=list)
Child reflections.
comment
class-attribute
instance-attribute
¤
comment: Comment | None = None
Documentation comment associated with the reflection.
default_value
class-attribute
instance-attribute
¤
default_value: str | None = None
Default value as TypeScript source text.
final_target
property
¤
final_target: Reflection
Final reflection reached by following reference targets.
flags
class-attribute
instance-attribute
¤
Reflection flags recorded by TypeDoc.
groups
class-attribute
instance-attribute
¤
Named groups of child reflections.
parent
class-attribute
instance-attribute
¤
parent: Reflection | None = None
Parent reflection, or None for a root reflection.
resolved_groups
property
¤
Groups with child IDs replaced by their reflections.
resolved_target
property
¤
resolved_target: Reflection
Referenced reflection resolved through the symbol map.
root_module
property
¤
root_module: Reflection
The highest ancestor below the project, or this reflection if it has no parent.
source_contents
property
¤
source_contents: str
Source lines joined together, with trailing whitespace and an opening brace removed.
sources
class-attribute
instance-attribute
¤
Source locations of the reflection.
symbol_map
property
¤
symbol_map: dict[int, Reflection]
Reflections indexed by ID, inherited from the parent when available.
get_logger
¤
Create and return a new logger instance.
Parameters:
Returns:
-
_Logger–The logger.
Source code in src/griffe_typedoc/_internal/logger.py
73 74 75 76 77 78 79 80 81 82 | |
get_parser
¤
get_parser() -> ArgumentParser
Return the CLI argument parser.
Returns:
-
ArgumentParser–An argparse parser.
Source code in src/griffe_typedoc/_internal/cli.py
48 49 50 51 52 53 54 55 56 57 | |
load
¤
load(
typedoc_command: str | list[str],
working_directory: str = ".",
) -> Project
Load TypeScript API data using TypeDoc.
Parameters:
-
(typedoc_command¤str | list[str]) –Name/path of the 1
typedocexecutable, or a command as list. -
(working_directory¤str, default:'.') –Where to execute the command.
Returns:
-
Project–Top-level project object containing API data.
Source code in src/griffe_typedoc/_internal/loader.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
main
¤
Run the main program.
This function is executed when you type griffe-typedoc or python -m griffe_typedoc.
Parameters:
Returns:
-
int–An exit code.
Source code in src/griffe_typedoc/_internal/cli.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
patch_loggers
¤
patch_loggers(
get_logger_func: Callable[[str], Any],
) -> None
Patch loggers.
Parameters:
-
(get_logger_func¤Callable[[str], Any]) –A function accepting a name as parameter and returning a logger.
Source code in src/griffe_typedoc/_internal/logger.py
85 86 87 88 89 90 91 | |