You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@vue/typescript-plugin

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/typescript-plugin - npm Package Compare versions

Comparing version

to
3.0.0

lib/requests/getCurrentComponentSlots.d.ts

40

lib/common.js

@@ -21,4 +21,2 @@ "use strict";

return getDefinitionAndBoundSpan(ts, language, languageService, vueOptions, asScriptId, target[p]);
case 'getQuickInfoAtPosition':
return getQuickInfoAtPosition(ts, target, target[p]);
// TS plugin only

@@ -243,40 +241,2 @@ case 'getEncodedSemanticClassifications':

}
function getQuickInfoAtPosition(ts, languageService, getQuickInfoAtPosition) {
return (...args) => {
const result = getQuickInfoAtPosition(...args);
if (result && result.documentation?.length === 1 && result.documentation[0].text.startsWith('__VLS_emit,')) {
const [_, emitVarName, eventName] = result.documentation[0].text.split(',');
const program = languageService.getProgram();
const typeChecker = program.getTypeChecker();
const sourceFile = program.getSourceFile(args[0]);
result.documentation = undefined;
let symbolNode;
sourceFile?.forEachChild(function visit(node) {
if (ts.isIdentifier(node) && node.text === emitVarName) {
symbolNode = node;
}
if (symbolNode) {
return;
}
ts.forEachChild(node, visit);
});
if (symbolNode) {
const emitSymbol = typeChecker.getSymbolAtLocation(symbolNode);
if (emitSymbol) {
const type = typeChecker.getTypeOfSymbolAtLocation(emitSymbol, symbolNode);
const calls = type.getCallSignatures();
for (const call of calls) {
const callEventName = typeChecker.getTypeOfSymbolAtLocation(call.parameters[0], symbolNode).value;
call.getJsDocTags();
if (callEventName === eventName) {
result.documentation = call.getDocumentationComment(typeChecker);
result.tags = call.getJsDocTags();
}
}
}
}
}
return result;
};
}
function getEncodedSemanticClassifications(ts, language, languageService, asScriptId, getEncodedSemanticClassifications) {

@@ -283,0 +243,0 @@ return (filePath, span, format) => {

8

package.json
{
"name": "@vue/typescript-plugin",
"version": "3.0.0-beta.5",
"version": "3.0.0",
"license": "MIT",

@@ -16,4 +16,4 @@ "files": [

"dependencies": {
"@volar/typescript": "2.4.15",
"@vue/language-core": "3.0.0-beta.5",
"@volar/typescript": "2.4.16",
"@vue/language-core": "3.0.0",
"@vue/shared": "^3.5.0",

@@ -26,3 +26,3 @@ "path-browserify": "^1.0.1"

},
"gitHead": "3a4648914c60c90444d939cf762a016a4318ca09"
"gitHead": "620f050fd494cccd215781907c950e17dae4fd58"
}