UNPKG

2 kBTypeScriptView Raw
1import * as ts from 'typescript';
2import { Logger } from '../utils/loggers';
3import { Reflection, ProjectReflection, Type } from '../models/index';
4import { Converter } from './converter';
5export declare class Context {
6 converter: Converter;
7 fileNames: string[];
8 checker: ts.TypeChecker;
9 program: ts.Program;
10 project: ProjectReflection;
11 scope: Reflection;
12 isExternal?: boolean;
13 isDeclaration?: boolean;
14 typeParameters?: ts.MapLike<Type>;
15 typeArguments?: Type[];
16 isInherit?: boolean;
17 inheritParent?: ts.Node;
18 inheritedChildren?: string[];
19 inherited?: string[];
20 visitStack: ts.Node[];
21 private externalPattern?;
22 constructor(converter: Converter, fileNames: string[], checker: ts.TypeChecker, program: ts.Program);
23 getCompilerOptions(): ts.CompilerOptions;
24 getTypeAtLocation(node: ts.Node): ts.Type | undefined;
25 getSymbolAtLocation(node: ts.Node): ts.Symbol | undefined;
26 expectSymbolAtLocation(node: ts.Node): ts.Symbol;
27 resolveAliasedSymbol(symbol: ts.Symbol): ts.Symbol;
28 resolveAliasedSymbol(symbol: ts.Symbol | undefined): ts.Symbol | undefined;
29 getLogger(): Logger;
30 registerReflection(reflection: Reflection, symbol?: ts.Symbol): void;
31 trigger(name: string, reflection: Reflection, node?: ts.Node): void;
32 withSourceFile(node: ts.SourceFile, callback: Function): void;
33 withScope(scope: Reflection | undefined, callback: () => void): void;
34 withScope(scope: Reflection | undefined, parameters: ts.NodeArray<ts.TypeParameterDeclaration> | undefined, callback: () => void): void;
35 withScope(scope: Reflection | undefined, parameters: ts.NodeArray<ts.TypeParameterDeclaration> | undefined, preserve: boolean, callback: () => void): void;
36 inherit(baseNode: ts.Node, typeArguments?: ts.NodeArray<ts.TypeNode>): Reflection;
37 isOutsideDocumentation(fileName: string, isExternal?: boolean): boolean;
38 isExternalFile(fileName: string): boolean;
39 private extractTypeParameters;
40}