/** * Library Docs IR types. * * These types describe the intermediate representation produced by the * server-side library documentation parser. They are consumed by the * library-docs-generator package in the fern CLI to render MDX pages. */ export interface DocstringExampleIr { code: string; description: string | undefined; } export interface DocstringParamIr { name: string; type: string | undefined; description: string | undefined; default: string | undefined; } export interface DocstringRaisesIr { type: string; description: string | undefined; } export interface DocstringReturnsIr { type: string | undefined; description: string | undefined; } export interface DocstringIr { summary: string | undefined; description: string | undefined; params: DocstringParamIr[]; returns: DocstringReturnsIr | undefined; raises: DocstringRaisesIr[]; examples: DocstringExampleIr[]; notes: string[]; warnings: string[]; } export interface IrMetadata { packageName: string; language: string; sourceUrl: string | undefined; branch: string | undefined; version: string | undefined; } export interface TypeInfo { display: string | undefined; resolvedPath: string | undefined; basePath: string | undefined; } export interface AttributeIr { name: string; path: string; typeInfo: TypeInfo | undefined; value: string | undefined; docstring: DocstringIr | undefined; } export interface BaseClassRef { name: string; typeInfo: TypeInfo | undefined; } export interface EnumMemberIr { name: string; value: string; } export declare const PythonClassKind: { readonly Class: "CLASS"; readonly Dataclass: "DATACLASS"; readonly Typeddict: "TYPEDDICT"; readonly Protocol: "PROTOCOL"; readonly Enum: "ENUM"; readonly Exception: "EXCEPTION"; }; export type PythonClassKind = (typeof PythonClassKind)[keyof typeof PythonClassKind]; export declare const PythonParameterKind: { readonly Positional: "POSITIONAL"; readonly Keyword: "KEYWORD"; readonly VarPositional: "VAR_POSITIONAL"; readonly VarKeyword: "VAR_KEYWORD"; readonly KeywordOnly: "KEYWORD_ONLY"; }; export type PythonParameterKind = (typeof PythonParameterKind)[keyof typeof PythonParameterKind]; export interface PythonParameterIr { name: string; typeInfo: TypeInfo | undefined; default: string | undefined; description: string | undefined; kind: PythonParameterKind; } export interface TypedDictFieldIr { name: string; typeInfo: TypeInfo | undefined; description: string | undefined; required: boolean; } export interface PythonFunctionIr { name: string; path: string; signature: string; docstring: DocstringIr | undefined; parameters: PythonParameterIr[]; returnTypeInfo: TypeInfo | undefined; isAsync: boolean; decorators: string[]; isClassmethod: boolean; isStaticmethod: boolean; isProperty: boolean; } export interface PythonClassIr { name: string; path: string; kind: PythonClassKind; bases: BaseClassRef[]; docstring: DocstringIr | undefined; constructorParams: PythonParameterIr[]; methods: PythonFunctionIr[]; attributes: AttributeIr[]; decorators: string[]; metaclass: string | undefined; isAbstract: boolean; hasSlots: boolean; typedDictFields: TypedDictFieldIr[] | undefined; enumMembers: EnumMemberIr[] | undefined; } export interface PythonModuleIr { name: string; path: string; docstring: DocstringIr | undefined; classes: PythonClassIr[]; functions: PythonFunctionIr[]; attributes: AttributeIr[]; submodules: PythonModuleIr[]; } export interface PythonLibraryDocsIr { metadata: IrMetadata; rootModule: PythonModuleIr; } export declare namespace cpp { interface CppTypeRef { text: string; refid: string; kindref: string; } type CppTypeInfoPartsItem = string | CppTypeRef; interface CppTypeInfo { parts: CppTypeInfoPartsItem[]; display: string | undefined; resolvedPath: string | undefined; basePath: string | undefined; } type CppClassKind = "class" | "struct"; type CppVirtuality = "non-virtual" | "virtual" | "pure-virtual"; type CppRefQualifier = "lvalue" | "rvalue"; type CppAccessSpecifier = "public" | "private" | "protected"; type CppParameterDirection = "in" | "out" | "inout"; interface CppDocTextSegment { type: "text"; text: string; } interface CppDocCodeSegment { type: "code"; code: string; } interface CppDocCodeRefSegment { type: "codeRef"; code: string; refid: string; kindref: string; } interface CppDocRefSegment { type: "ref"; text: string; refid: string; kindref: string; } interface CppDocBoldSegment { type: "bold"; text: string; } interface CppDocEmphasisSegment { type: "emphasis"; text: string; } interface CppDocLinkSegment { type: "link"; text: string; url: string; } interface CppDocSubscriptSegment { type: "subscript"; text: string; } interface CppDocSuperscriptSegment { type: "superscript"; text: string; } type CppDocSegment = CppDocTextSegment | CppDocCodeSegment | CppDocCodeRefSegment | CppDocRefSegment | CppDocBoldSegment | CppDocEmphasisSegment | CppDocLinkSegment | CppDocSubscriptSegment | CppDocSuperscriptSegment; interface CppParagraphBlock { type: "paragraph"; segments: CppDocSegment[]; } interface CppCodeBlock { type: "codeBlock"; code: string; language: string | undefined; } interface CppVerbatimBlock { type: "verbatim"; content: string; format: string | undefined; } interface CppListBlock { type: "list"; ordered: boolean; items: CppDocBlock[][]; } interface CppImageBlock { type: "image"; path: string; caption: string | undefined; isInline: boolean; } interface CppTitledSectionBlock { type: "titledSection"; title: string | undefined; blocks: CppDocBlock[]; } type CppDocBlock = CppParagraphBlock | CppCodeBlock | CppVerbatimBlock | CppListBlock | CppImageBlock | CppTitledSectionBlock; interface CppParamDoc { name: string; description: CppDocSegment[]; direction: CppParameterDirection | undefined; } interface CppRaisesDoc { exception: string; description: CppDocSegment[]; } interface CppDocstringIr { summary: CppDocSegment[]; description: CppDocBlock[]; params: CppParamDoc[]; templateParamsDoc: CppParamDoc[]; returns: CppDocSegment[] | undefined; raises: CppRaisesDoc[]; examples: CppCodeBlock[]; notes: CppDocSegment[][]; warnings: CppDocSegment[][]; remarks: CppDocSegment[][]; preconditions: CppDocSegment[][]; postconditions: CppDocSegment[][]; seeAlso: CppDocSegment[][]; sinceVersion: string | undefined; deprecated: CppDocSegment[] | undefined; } interface CppTemplateParamIr { type: string; name: string | undefined; defaultValue: CppTypeInfo | undefined; isVariadic: boolean; } interface CppParameterIr { name: string; typeInfo: CppTypeInfo | undefined; defaultValue: CppTypeInfo | undefined; arraySuffix: string | undefined; direction: CppParameterDirection | undefined; } interface CppEnumValueIr { name: string; id: string | undefined; initializer: string | undefined; docstring: CppDocstringIr | undefined; } interface CppEnumIr { name: string; path: string; isScoped: boolean; underlyingType: string | undefined; values: CppEnumValueIr[]; docstring: CppDocstringIr | undefined; } interface CppTypedefIr { name: string; path: string; typeInfo: CppTypeInfo | undefined; templateParams: CppTemplateParamIr[]; docstring: CppDocstringIr | undefined; } interface CppVariableIr { name: string; path: string; typeInfo: CppTypeInfo | undefined; initializer: string | undefined; templateParams: CppTemplateParamIr[]; isStatic: boolean; isConstexpr: boolean; isMutable: boolean; docstring: CppDocstringIr | undefined; } interface CppBaseClassRef { name: string; typeInfo: CppTypeInfo | undefined; access: CppAccessSpecifier; isVirtual: boolean; } interface CppFunctionIr { name: string; path: string; signature: string; templateParams: CppTemplateParamIr[]; parameters: CppParameterIr[]; returnType: CppTypeInfo | undefined; docstring: CppDocstringIr | undefined; isStatic: boolean; isConst: boolean; isConstexpr: boolean; isVolatile: boolean; isInline: boolean; isExplicit: boolean; isNoexcept: boolean; noexceptExpression: string | undefined; isNoDiscard: boolean; virtuality: CppVirtuality; refQualifier: CppRefQualifier | undefined; requiresClause: string | undefined; isDeleted: boolean; } interface CppClassIr { name: string; path: string; kind: CppClassKind; templateParams: CppTemplateParamIr[]; baseClasses: CppBaseClassRef[]; derivedClasses: CppBaseClassRef[]; docstring: CppDocstringIr | undefined; isAbstract: boolean; isFinal: boolean; includeHeader: string | undefined; methods: CppFunctionIr[]; staticMethods: CppFunctionIr[]; friendFunctions: CppFunctionIr[]; typedefs: CppTypedefIr[]; memberVariables: CppVariableIr[]; enums: CppEnumIr[]; innerClasses: CppClassIr[]; relatedMemberRefs: string[]; sectionLabels: Record; } interface CppConceptIr { name: string; path: string; templateParams: CppTemplateParamIr[]; constraintExpression: string | undefined; docstring: CppDocstringIr | undefined; } interface CppNamespaceIr { name: string; path: string; docstring: CppDocstringIr | undefined; classes: CppClassIr[]; functions: CppFunctionIr[]; enums: CppEnumIr[]; typedefs: CppTypedefIr[]; variables: CppVariableIr[]; concepts: CppConceptIr[]; namespaces: CppNamespaceIr[]; } interface CppGroupIr { id: string; name: string; title: string; docstring: CppDocstringIr | undefined; memberRefs: string[]; innerClassRefs: string[]; innerNamespaceRefs: string[]; subgroups: CppGroupIr[]; } interface CppLibraryDocsIr { metadata: IrMetadata; rootNamespace: CppNamespaceIr; groups: CppGroupIr[]; } } //# sourceMappingURL=libraryDocs.d.ts.map