We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Ref
RefSymbol
1 parent dbe8b53 commit 49aa565Copy full SHA for 49aa565
packages/typescript-plugin/lib/requests/isRefAtPosition.ts
@@ -48,7 +48,14 @@ export function isRefAtPosition(
48
const type = checker.getTypeAtLocation(node);
49
const props = type.getProperties();
50
51
- return props.some(prop => prop.escapedName === 'value' && prop.flags & ts.SymbolFlags.Accessor);
+ return props.some(prop =>
52
+ prop.declarations?.some(decl =>
53
+ ts.isPropertySignature(decl)
54
+ && ts.isComputedPropertyName(decl.name)
55
+ && ts.isIdentifier(decl.name.expression)
56
+ && decl.name.expression.text === 'RefSymbol'
57
+ )
58
+ );
59
60
function findPositionIdentifier(sourceFile: ts.SourceFile, node: ts.Node, offset: number) {
61
let result: ts.Node | undefined;
0 commit comments