1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import { NodePath } from '@babel/traverse';
|
15 | import * as babel from '@babel/types';
|
16 | import * as doctrine from 'doctrine';
|
17 | import { MethodParam, ScannedMethod, ScannedProperty } from '../index';
|
18 | import { Result } from '../model/analysis';
|
19 | import { ImmutableSet } from '../model/immutable';
|
20 | import { Privacy } from '../model/model';
|
21 | import { ScannedEvent, SourceRange, Warning } from '../model/model';
|
22 | import { ParsedDocument } from '../parser/document';
|
23 | import { JavaScriptDocument } from './javascript-document';
|
24 | import * as jsdoc from './jsdoc';
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | export declare function matchesCallExpression(expression: babel.MemberExpression, path: string[]): boolean;
|
37 | export declare type PropertyOrMethod = babel.ObjectProperty | babel.ObjectMethod | babel.ClassMethod | babel.AssignmentProperty;
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare function getPropertyName(prop: PropertyOrMethod): string | undefined;
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | export declare function getSimpleObjectProperties(node: babel.ObjectExpression): IterableIterator<babel.ObjectMember>;
|
48 |
|
49 | export declare function getSimpleObjectPropPaths(nodePath: NodePath<babel.ObjectExpression>): IterableIterator<NodePath<babel.ObjectMethod> | NodePath<babel.ObjectProperty>>;
|
50 | export declare const CLOSURE_CONSTRUCTOR_MAP: Map<string, string>;
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export declare function getClosureType(node: babel.Node, parsedJsdoc: doctrine.Annotation | undefined, sourceRange: SourceRange, document: ParsedDocument): Result<string, Warning>;
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | export declare function getBestComment(nodePath: NodePath): string | undefined;
|
67 | export declare function getAttachedComment(node: babel.Node): string | undefined;
|
68 |
|
69 |
|
70 |
|
71 | export declare function getEventComments(node: babel.Node): Map<string, ScannedEvent>;
|
72 | export declare function getPropertyValue(node: babel.ObjectExpression, name: string): babel.Node | undefined;
|
73 |
|
74 |
|
75 |
|
76 | export declare function toScannedMethod(node: babel.ObjectProperty | babel.ObjectMethod | babel.ClassMethod, sourceRange: SourceRange, document: JavaScriptDocument): ScannedMethod;
|
77 | export declare function getReturnFromAnnotation(jsdocAnn: jsdoc.Annotation): {
|
78 | type?: string;
|
79 | desc?: string;
|
80 | } | undefined;
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 | export declare function inferReturnFromBody(node: babel.Function): {
|
87 | type: string;
|
88 | } | undefined;
|
89 | export declare function toMethodParam(nodeParam: babel.LVal, jsdocAnn?: jsdoc.Annotation): MethodParam;
|
90 | export declare function getOrInferPrivacy(name: string, annotation: jsdoc.Annotation | undefined, defaultPrivacy?: Privacy): Privacy;
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | export declare const configurationProperties: ImmutableSet<string>;
|
99 |
|
100 |
|
101 |
|
102 | export declare function getMethods(node: babel.Node, document: JavaScriptDocument): Map<string, ScannedMethod>;
|
103 | export declare function getConstructorMethod(astNode: babel.Node, document: JavaScriptDocument): ScannedMethod | undefined;
|
104 | export declare function getConstructorClassMethod(astNode: babel.Class): babel.ClassMethod | undefined;
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | export declare function getStaticMethods(node: babel.Node, document: JavaScriptDocument): Map<string, ScannedMethod>;
|
110 | export declare function extractPropertyFromGetterOrSetter(method: babel.ClassMethod | babel.ObjectMethod, jsdocAnn: jsdoc.Annotation | undefined, document: JavaScriptDocument): ScannedProperty | null;
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | export declare function extractPropertiesFromClassOrObjectBody(node: babel.Class | babel.ObjectExpression, document: JavaScriptDocument): Map<string, ScannedProperty>;
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 | export declare function getCanonicalStatement(nodePath: NodePath): babel.Statement | undefined;
|
134 |
|
135 | export declare function getBindingNamesFromDeclaration(declaration: babel.Declaration | null | undefined): IterableIterator<string>;
|