Skip to content

Commit

Permalink
feat: support auto insert dot value on vue 2
Browse files Browse the repository at this point in the history
close #1466
  • Loading branch information
johnsoncodehk committed Jun 17, 2022
1 parent 8bb99d1 commit d2d3aa2
Showing 1 changed file with 9 additions and 11 deletions.
Expand Up @@ -141,17 +141,15 @@ export function isRefType(typeDefs: vscode.LocationLink[], tsLs: ts2.LanguageSer
for (const typeDefine of typeDefs) {
const uri = vscode.Location.is(typeDefine) ? typeDefine.uri : typeDefine.targetUri;
const range = vscode.Location.is(typeDefine) ? typeDefine.range : typeDefine.targetSelectionRange;
if (uri.endsWith('reactivity.d.ts')) {
const defineDoc = tsLs.__internal__.getTextDocument(uri);
if (!defineDoc)
continue;
const typeName = defineDoc.getText(range);
switch (typeName) {
case 'Ref':
case 'ComputedRef':
case 'WritableComputedRef':
return true;
}
const defineDoc = tsLs.__internal__.getTextDocument(uri);
if (!defineDoc)
continue;
const typeName = defineDoc.getText(range);
switch (typeName) {
case 'Ref':
case 'ComputedRef':
case 'WritableComputedRef':
return true;
}
}
return false;
Expand Down

0 comments on commit d2d3aa2

Please sign in to comment.