@@ -72,7 +72,7 @@ const generateModuleDeclaration = (module, index, API) => {
72
72
}
73
73
74
74
for ( let method of [ 'on' , 'once' , 'addListener' , 'removeListener' ] ) {
75
- moduleAPI . push ( `${ isClass ? 'public ' : '' } ${ method } (event: '${ moduleEvent . name } ', listener: ${ listener } ): this;` )
75
+ moduleAPI . push ( `${ method } (event: '${ moduleEvent . name } ', listener: ${ listener } ): this;` )
76
76
}
77
77
} )
78
78
@@ -102,7 +102,7 @@ const generateModuleDeclaration = (module, index, API) => {
102
102
}
103
103
104
104
for ( let method of [ 'addEventListener' , 'removeEventListener' ] ) {
105
- moduleAPI . push ( `${ isClass ? 'public ' : '' } ${ method } (event: '${ domEvent . name } ', listener: (event: ${ eventType } ) => void${ method === 'addEventListener' ? ', useCapture?: boolean' : '' } ): this;` )
105
+ moduleAPI . push ( `${ method } (event: '${ domEvent . name } ', listener: (event: ${ eventType } ) => void${ method === 'addEventListener' ? ', useCapture?: boolean' : '' } ): this;` )
106
106
}
107
107
} )
108
108
}
@@ -113,8 +113,6 @@ const generateModuleDeclaration = (module, index, API) => {
113
113
if ( typeof prefix === 'undefined' ) {
114
114
prefix = ''
115
115
}
116
- const markAsPublic = isClass ? 'public ' : ''
117
- prefix = `${ markAsPublic } ${ prefix } ` || markAsPublic
118
116
utils . extendArray ( moduleAPI , utils . wrapComment ( moduleMethod . description ) )
119
117
let returnType = returnsThis ( moduleMethod ) ? 'this' : 'void'
120
118
@@ -167,7 +165,7 @@ const generateModuleDeclaration = (module, index, API) => {
167
165
module . instanceProperties
168
166
. sort ( ( a , b ) => a . name . localeCompare ( b . name ) )
169
167
. forEach ( prop => {
170
- moduleAPI . push ( `public ${ prop . name } : ${ utils . typify ( prop ) } ;` )
168
+ moduleAPI . push ( `${ prop . name } : ${ utils . typify ( prop ) } ;` )
171
169
} )
172
170
}
173
171
@@ -177,10 +175,10 @@ const generateModuleDeclaration = (module, index, API) => {
177
175
. sort ( ( a , b ) => a . name . localeCompare ( b . name ) )
178
176
. forEach ( prop => {
179
177
if ( prop . type === 'Class' ) {
180
- moduleAPI . push ( `public static ${ prop . name } : typeof ${ prop . name } ;` )
178
+ moduleAPI . push ( `static ${ prop . name } : typeof ${ prop . name } ;` )
181
179
generateModuleDeclaration ( prop , - 1 , API )
182
180
} else {
183
- moduleAPI . push ( `public static ${ prop . name } : ${ utils . typify ( prop ) } ;` )
181
+ moduleAPI . push ( `static ${ prop . name } : ${ utils . typify ( prop ) } ;` )
184
182
}
185
183
} )
186
184
}
@@ -196,14 +194,13 @@ const generateModuleDeclaration = (module, index, API) => {
196
194
paramType = paramInterfaces . createParamInterface ( p , '' )
197
195
}
198
196
199
- const isPublic = isClass ? 'public ' : ''
200
197
const isStatic = isStaticVersion ? 'static ' : ''
201
198
const isOptional = utils . isOptional ( p ) ? '?' : ''
202
199
const type = utils . typify ( paramType )
203
200
204
201
utils . extendArray ( moduleAPI , utils . wrapComment ( p . description ) )
205
202
if ( module . name === 'process' && p . name === 'versions' ) return
206
- moduleAPI . push ( `${ isPublic } ${ isStatic } ${ p . name } ${ isOptional } : ${ type } ;` )
203
+ moduleAPI . push ( `${ isStatic } ${ p . name } ${ isOptional } : ${ type } ;` )
207
204
} )
208
205
}
209
206
0 commit comments