1 | import { ECPoint, UInt160, UInt256 } from '@neo-one/client-common';
|
2 | import { AnyNameableNode } from '@neo-one/ts-utils';
|
3 | import ts from 'typescript';
|
4 | import { Context } from '../Context';
|
5 | export interface ErrorDiagnosticOptions {
|
6 | readonly error?: boolean;
|
7 | }
|
8 | export interface DiagnosticOptions extends ErrorDiagnosticOptions {
|
9 | readonly warning?: boolean;
|
10 | }
|
11 | export declare const DEFAULT_DIAGNOSTIC_OPTIONS: {
|
12 | error: boolean;
|
13 | warning: boolean;
|
14 | };
|
15 | export interface SignatureTypes {
|
16 | readonly paramDecls: ReadonlyArray<ts.ParameterDeclaration>;
|
17 | readonly paramTypes: Map<ts.ParameterDeclaration, ts.Type | undefined>;
|
18 | readonly returnType: ts.Type | undefined;
|
19 | }
|
20 | export declare class AnalysisService {
|
21 | private readonly context;
|
22 | private readonly memoized;
|
23 | constructor(context: Context);
|
24 | getFunctionReturnType(node: ts.SignatureDeclaration, options?: DiagnosticOptions): ts.Type | undefined;
|
25 | extractAllSignatures(node: ts.Node, options?: DiagnosticOptions): ReadonlyArray<SignatureTypes>;
|
26 | extractSignature(node: ts.Node, options?: DiagnosticOptions): SignatureTypes | undefined;
|
27 | getSignatures(node: ts.CallLikeExpression): ReadonlyArray<ts.Signature> | undefined;
|
28 | extractAllSignaturesForType(node: ts.Node, type: ts.Type | undefined, options?: DiagnosticOptions): ReadonlyArray<SignatureTypes>;
|
29 | extractSignatureForType(node: ts.Node, type: ts.Type | undefined, options?: DiagnosticOptions): SignatureTypes | undefined;
|
30 | extractSignaturesForCall(node: ts.CallLikeExpression, options?: DiagnosticOptions): ReadonlyArray<SignatureTypes> | undefined;
|
31 | extractSignatureTypes(node: ts.Node, signature: ts.Signature, options?: DiagnosticOptions): SignatureTypes | undefined;
|
32 | extractLiteralAddress(original: ts.Expression): UInt160 | undefined;
|
33 | extractLiteralHash256(original: ts.Expression): UInt256 | undefined;
|
34 | extractLiteralPublicKey(original: ts.Expression): ECPoint | undefined;
|
35 | getType(node: ts.Node, options?: ErrorDiagnosticOptions): ts.Type | undefined;
|
36 | getTypeOfSymbol(symbol: ts.Symbol | undefined, node: ts.Node): ts.Type | undefined;
|
37 | getSymbol(node: ts.Node): ts.Symbol | undefined;
|
38 | getTypeSymbol(node: ts.Node): ts.Symbol | undefined;
|
39 | getSymbolForType(_node: ts.Node, type: ts.Type | undefined): ts.Symbol | undefined;
|
40 | getNotAnyType(node: ts.Node, type: ts.Type | undefined, { error }?: ErrorDiagnosticOptions): ts.Type | undefined;
|
41 | extractStorageKey(node: ts.Node): string | undefined;
|
42 | isSmartContract(node: ts.ClassDeclaration): boolean;
|
43 | isSmartContractNode(node: ts.Node): boolean;
|
44 | getSymbolAndAllInheritedSymbols(node: ts.Node): ReadonlyArray<ts.Symbol>;
|
45 | isValidStorageType(node: ts.Node, type: ts.Type): boolean;
|
46 | findReferencesAsNodes(node: AnyNameableNode | ts.Identifier): ReadonlyArray<ts.Node>;
|
47 | isSmartContractMixinFunction(node: ts.FunctionDeclaration | ts.FunctionExpression): boolean;
|
48 | private isValidStorageArray;
|
49 | private isValidStorageMap;
|
50 | private isValidStorageSet;
|
51 | private extractLiteral;
|
52 | private traceIdentifier;
|
53 | private unwrapExpression;
|
54 | private report;
|
55 | }
|