1 | import ts from "typescript";
|
2 | import { type Reflection, type ProjectReflection, DeclarationReflection, type DocumentReflection, ReflectionKind } from "../models/index.js";
|
3 | import type { Converter } from "./converter.js";
|
4 | import type { TranslationProxy } from "../internationalization/internationalization.js";
|
5 |
|
6 |
|
7 |
|
8 | export declare class Context {
|
9 | |
10 |
|
11 |
|
12 | readonly converter: Converter;
|
13 | |
14 |
|
15 |
|
16 | get checker(): ts.TypeChecker;
|
17 | |
18 |
|
19 |
|
20 | get i18n(): TranslationProxy;
|
21 | |
22 |
|
23 |
|
24 |
|
25 | get program(): ts.Program;
|
26 | private _program?;
|
27 | |
28 |
|
29 |
|
30 | readonly programs: readonly ts.Program[];
|
31 | |
32 |
|
33 |
|
34 | readonly project: ProjectReflection;
|
35 | |
36 |
|
37 |
|
38 | readonly scope: Reflection;
|
39 | convertingTypeNode: boolean;
|
40 | convertingClassOrInterface: boolean;
|
41 | shouldBeStatic: boolean;
|
42 | |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | constructor(converter: Converter, programs: readonly ts.Program[], project: ProjectReflection, scope?: Context["scope"]);
|
49 | /** @internal */
|
50 | get logger(): import("../utils/loggers.js").Logger;
|
51 | /**
|
52 | * Return the type declaration of the given node.
|
53 | *
|
54 | * @param node The TypeScript node whose type should be resolved.
|
55 | * @returns The type declaration of the given node.
|
56 | */
|
57 | getTypeAtLocation(node: ts.Node): ts.Type | undefined;
|
58 | getSymbolAtLocation(node: ts.Node): ts.Symbol | undefined;
|
59 | expectSymbolAtLocation(node: ts.Node): ts.Symbol;
|
60 | resolveAliasedSymbol(symbol: ts.Symbol): ts.Symbol;
|
61 | createDeclarationReflection(kind: ReflectionKind, symbol: ts.Symbol | undefined, exportSymbol: ts.Symbol | undefined, nameOverride?: string): DeclarationReflection;
|
62 | postReflectionCreation(reflection: Reflection, symbol: ts.Symbol | undefined, exportSymbol: ts.Symbol | undefined): void;
|
63 | finalizeDeclarationReflection(reflection: DeclarationReflection): void;
|
64 | addChild(reflection: DeclarationReflection | DocumentReflection): void;
|
65 | shouldIgnore(symbol: ts.Symbol): boolean;
|
66 | /**
|
67 | * Register a newly generated reflection. All created reflections should be
|
68 | * passed to this method to ensure that the project helper functions work correctly.
|
69 | *
|
70 | * @param reflection The reflection that should be registered.
|
71 | * @param symbol The symbol the given reflection was resolved from.
|
72 | */
|
73 | registerReflection(reflection: Reflection, symbol: ts.Symbol | undefined): void;
|
74 | /** @internal */
|
75 | setActiveProgram(program: ts.Program | undefined): void;
|
76 | getComment(symbol: ts.Symbol, kind: ReflectionKind): import("../models/index.js").Comment | undefined;
|
77 | getNodeComment(node: ts.Node, moduleComment: boolean): import("../models/index.js").Comment | undefined;
|
78 | getFileComment(node: ts.SourceFile): import("../models/index.js").Comment | undefined;
|
79 | getJsDocComment(declaration: ts.JSDocPropertyLikeTag | ts.JSDocCallbackTag | ts.JSDocTypedefTag | ts.JSDocTemplateTag | ts.JSDocEnumTag): import("../models/index.js").Comment | undefined;
|
80 | getSignatureComment(declaration: ts.SignatureDeclaration | ts.JSDocSignature): import("../models/index.js").Comment | undefined;
|
81 | withScope(scope: Reflection): Context;
|
82 | }
|