UNPKG

2.16 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt
6 * The complete set of authors may be found at
7 * http://polymer.github.io/AUTHORS.txt
8 * The complete set of contributors may be found at
9 * http://polymer.github.io/CONTRIBUTORS.txt
10 * Code distributed by Google as part of the polymer project is also
11 * subject to an additional IP rights grant found at
12 * http://polymer.github.io/PATENTS.txt
13 */
14import { Document, Feature, JsAstNode, Privacy, Resolvable, SourceRange, Warning } from '../model/model';
15import { Annotation as JsDocAnnotation } from './jsdoc';
16export declare class ScannedFunction implements Resolvable {
17 name: string;
18 description?: string;
19 summary?: string;
20 jsdoc?: JsDocAnnotation;
21 sourceRange: SourceRange;
22 astNode: JsAstNode;
23 warnings: Warning[];
24 params?: {
25 name: string;
26 type?: string;
27 desc: string;
28 }[];
29 return?: {
30 type?: string;
31 desc?: string;
32 };
33 privacy: Privacy;
34 templateTypes?: string[];
35 constructor(name: string, description: string, summary: string, privacy: Privacy, astNode: JsAstNode, jsdoc: JsDocAnnotation, sourceRange: SourceRange, params?: {
36 name: string;
37 type?: string;
38 desc: string;
39 }[], returnData?: {
40 type?: string;
41 desc?: string;
42 }, templateTypes?: string[]);
43 resolve(_document: Document): Function;
44}
45declare module '../model/queryable' {
46 interface FeatureKindMap {
47 'function': Function;
48 }
49}
50export declare class Function implements Feature {
51 name: string;
52 description?: string;
53 summary?: string;
54 privacy: Privacy;
55 kinds: Set<string>;
56 identifiers: Set<string>;
57 sourceRange: SourceRange;
58 astNode: JsAstNode;
59 warnings: Warning[];
60 params?: {
61 name: string;
62 type?: string;
63 }[];
64 return?: {
65 type?: string;
66 desc?: string;
67 };
68 templateTypes?: string[];
69 constructor(scannedFunction: ScannedFunction);
70 toString(): string;
71}