File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
- /* @internal */
1
+ /* @internal */
2
2
namespace ts . JsDoc {
3
3
const jsDocTagNames = [
4
4
"augments" ,
@@ -166,15 +166,20 @@ namespace ts.JsDoc {
166
166
const lineStart = sourceFile . getLineStarts ( ) [ posLineAndChar . line ] ;
167
167
168
168
const indentationStr = sourceFile . text . substr ( lineStart , posLineAndChar . character ) ;
169
+ const isJavaScriptFile = hasJavaScriptFileExtension ( sourceFile . fileName ) ;
169
170
170
171
let docParams = "" ;
171
172
for ( let i = 0 , numParams = parameters . length ; i < numParams ; i ++ ) {
172
173
const currentName = parameters [ i ] . name ;
173
174
const paramName = currentName . kind === SyntaxKind . Identifier ?
174
175
( < Identifier > currentName ) . text :
175
176
"param" + i ;
176
-
177
- docParams += `${ indentationStr } * @param ${ paramName } ${ newLine } ` ;
177
+ if ( isJavaScriptFile ) {
178
+ docParams += `${ indentationStr } * @param {any} ${ paramName } ${ newLine } ` ;
179
+ }
180
+ else {
181
+ docParams += `${ indentationStr } * @param ${ paramName } ${ newLine } ` ;
182
+ }
178
183
}
179
184
180
185
// A doc comment consists of the following
You can’t perform that action at this time.
0 commit comments