forked from englercj/tsd-jsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsdoc.d.ts
162 lines (139 loc) · 3.21 KB
/
jsdoc.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// tslint:disable
/// <reference path='dts-jsdoc.d.ts' />
/// <reference path='taffydb.d.ts' />
// tslint:enable
declare type TDocletDb = ITaffyInstance<TDoclet>;
declare module 'jsdoc/env' {
interface ITemplates {
jsdoc2tsd: ITemplateConfig;
}
interface IConf {
templates: ITemplates;
}
export const conf: IConf;
}
declare module 'jsdoc/util/templateHelper' {
export function find(data: TDocletDb, query: any): Array<(TDoclet | IPackageDoclet)>;
}
/**
* Doclet Base and util types
*/
declare interface IDocletType {
names: string[];
}
declare interface IDocletProp {
type: IDocletType;
name: string;
description: string;
comment: string;
defaultvalue?: string;
meta?: any;
optional?: boolean;
variable?: boolean;
}
declare interface IDocletReturn {
type: IDocletType;
description: string;
}
declare interface IDocletCode {
id: string;
name: string;
type: string;
value?: string;
paramnames?: string[];
}
declare interface IDocletMeta {
range: number[];
filename: string;
lineno: number;
path: string;
code: IDocletCode;
}
declare interface IDocletTag {
originalTitle: string;
title: string;
text: string;
value: string;
}
declare interface IDocletBase {
meta?: IDocletMeta;
name: string;
scope: string;
longname: string;
variation?: string;
tags?: IDocletTag[];
memberof?: string;
see?: string;
access?: ('public' | 'private' | 'protected');
examples?: string;
deprecated?: string;
defaultvalue?: string;
comment?: string;
description?: string;
ignore?: boolean;
undocumented?: boolean;
properties?: IDocletProp[];
inherits?: string;
inherited?: boolean;
}
/**
* Specific doclet types
*/
declare interface IClassDoclet extends IDocletBase {
kind: 'class' | 'interface' | 'mixin';
params?: IDocletProp[];
augments?: string[];
implements?: string[];
mixes?: string[];
virtual?: boolean;
classdesc?: string;
}
declare interface IFileDoclet extends IDocletBase {
kind: 'file';
params?: IDocletProp[];
}
declare interface IEventDoclet extends IDocletBase {
kind: 'event';
params?: IDocletProp[];
}
declare interface IFunctionDoclet extends IDocletBase {
kind: 'function' | 'callback';
this?: string;
params?: IDocletProp[];
returns?: IDocletReturn[];
override?: boolean;
virtual?: string[];
}
declare interface IMemberDoclet extends IDocletBase {
kind: 'member' | 'constant';
readonly: boolean;
isEnum: boolean;
type: IDocletType;
}
declare interface INamespaceDoclet extends IDocletBase {
kind: 'namespace' | 'module';
}
declare interface ITypedefDoclet extends IDocletBase {
kind: 'typedef';
type: IDocletType;
// function typedef
this?: string;
params?: IDocletProp[];
returns?: IDocletReturn[];
}
declare interface IPackageDoclet {
kind: 'package';
longname: string;
files: string[];
name?: string;
}
declare type TDoclet = (
IClassDoclet
| IEventDoclet
| IFileDoclet
| IFunctionDoclet
| IMemberDoclet
| INamespaceDoclet
| ITypedefDoclet
);
declare type TAnyDoclet = TDoclet | IPackageDoclet;