File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1- /* @internal */
1+ /* @internal */
22namespace ts . JsDoc {
33 const jsDocTagNames = [
44 "augments" ,
@@ -166,15 +166,20 @@ namespace ts.JsDoc {
166166 const lineStart = sourceFile . getLineStarts ( ) [ posLineAndChar . line ] ;
167167
168168 const indentationStr = sourceFile . text . substr ( lineStart , posLineAndChar . character ) ;
169+ const isJavaScriptFile = hasJavaScriptFileExtension ( sourceFile . fileName ) ;
169170
170171 let docParams = "" ;
171172 for ( let i = 0 , numParams = parameters . length ; i < numParams ; i ++ ) {
172173 const currentName = parameters [ i ] . name ;
173174 const paramName = currentName . kind === SyntaxKind . Identifier ?
174175 ( < Identifier > currentName ) . text :
175176 "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+ }
178183 }
179184
180185 // A doc comment consists of the following
You can’t perform that action at this time.
0 commit comments