mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix length of JSDocTypedefTag
(Accidentally broken in dcc27eb.) Fixes #43394 and microsoft/tsserverfuzzer#309.
This commit is contained in:
@@ -8011,7 +8011,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
const typedefTag = factory.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);
|
||||
return finishNode(typedefTag, start);
|
||||
return finishNode(typedefTag, start, end);
|
||||
}
|
||||
|
||||
function parseJSDocTypeNameWithNamespace(nested?: boolean) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ tests/cases/conformance/jsdoc/declarations/file.js(6,5): error TS4084: Exported
|
||||
|
||||
==== tests/cases/conformance/jsdoc/declarations/file.js (3 errors) ====
|
||||
/** @typedef {import('./base')} BaseFactory */
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS4084: Exported type alias 'BaseFactory' has or is using private name 'Base' from module "tests/cases/conformance/jsdoc/declarations/base".
|
||||
/**
|
||||
* @callback BaseFactoryFactory
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"marker": {
|
||||
"fileName": "/tests/cases/fourslash/jsDocSignature-43394.ts",
|
||||
"position": 58,
|
||||
"name": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,7 @@
|
||||
// @allowJs: true
|
||||
|
||||
// @Filename: /a.js
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}T|] |]*/
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}T|]|] */
|
||||
////
|
||||
/////**
|
||||
//// * @return {[|T|]}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// @Filename: /a.js
|
||||
////module.exports = 0;
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}Foo|] |]*/
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}Foo|]|] */
|
||||
////const dummy = 0;
|
||||
|
||||
// @Filename: /b.js
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
/////**
|
||||
//// * @typedef {Object} Foo
|
||||
//// * @property {number} ...
|
||||
//// * /**/@typedef {number} Bar
|
||||
//// */
|
||||
|
||||
verify.baselineSignatureHelp();
|
||||
@@ -3,7 +3,7 @@
|
||||
// @allowJs: true
|
||||
// @Filename: a.js
|
||||
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}T|] |]*/
|
||||
/////** [|@typedef {number} [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}T|]|] */
|
||||
|
||||
////[|const [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}T|] = 1;|]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: jsDocTypedef_form2.js
|
||||
////
|
||||
//// /** [|@typedef {(string | number)} [|{| "contextRangeIndex": 0 |}NumberLike|] |]*/
|
||||
//// /** [|@typedef {(string | number)} [|{| "contextRangeIndex": 0 |}NumberLike|]|] */
|
||||
////
|
||||
//// /** @type {[|NumberLike|]} */
|
||||
//// var numberLike;
|
||||
|
||||
Reference in New Issue
Block a user