mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
@@ -5727,6 +5727,9 @@ namespace ts {
|
||||
function parseJSDocParameter(): ParameterDeclaration {
|
||||
const parameter = <ParameterDeclaration>createNode(SyntaxKind.Parameter);
|
||||
parameter.type = parseJSDocType();
|
||||
if (parseOptional(SyntaxKind.EqualsToken)) {
|
||||
parameter.questionToken = createNode(SyntaxKind.QuestionToken);
|
||||
}
|
||||
return finishNode(parameter);
|
||||
}
|
||||
|
||||
|
||||
12
tests/cases/fourslash/jsDocFunctionSignatures2.ts
Normal file
12
tests/cases/fourslash/jsDocFunctionSignatures2.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: Foo.js
|
||||
|
||||
//// /** @type {function(string, boolean=): number} */
|
||||
//// var f6;
|
||||
////
|
||||
//// f6('', /**/false)
|
||||
|
||||
goTo.marker();
|
||||
verify.currentSignatureHelpIs('f6(p0: string, p1?: boolean): number')
|
||||
Reference in New Issue
Block a user