mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(46606): show completion in jsdoc property tag (#46657)
This commit is contained in:
@@ -3531,8 +3531,9 @@ namespace ts.Completions {
|
||||
|
||||
/** Get the corresponding JSDocTag node if the position is in a jsDoc comment */
|
||||
function getJsDocTagAtPosition(node: Node, position: number): JSDocTag | undefined {
|
||||
const jsdoc = findAncestor(node, isJSDoc);
|
||||
return jsdoc && jsdoc.tags && (rangeContainsPosition(jsdoc, position) ? findLast(jsdoc.tags, tag => tag.pos < position) : undefined);
|
||||
return findAncestor(node, n =>
|
||||
isJSDocTag(n) && rangeContainsPosition(n, position) ? true :
|
||||
isJSDoc(n) ? "quit" : false) as JSDocTag | undefined;
|
||||
}
|
||||
|
||||
export function getPropertiesForObjectExpression(contextualType: Type, completionsType: Type | undefined, obj: ObjectLiteralExpression | JsxAttributes, checker: TypeChecker): Symbol[] {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
/////**
|
||||
//// * @typedef {Object} Foo
|
||||
//// * @property {/**/}
|
||||
//// */
|
||||
|
||||
verify.completions(
|
||||
{ marker: "", exact: completion.globalTypes },
|
||||
);
|
||||
Reference in New Issue
Block a user