@vue/typescript-plugin 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/lib/common.js +2 -2
- package/lib/requests/getReactiveReferences.d.ts +3 -10
- package/lib/requests/getReactiveReferences.js +44 -595
- package/package.json +4 -3
- package/lib/proxy.d.ts +0 -3
- package/lib/proxy.js +0 -227
- package/lib/requests/getComponentHighlights.d.ts +0 -1
- package/lib/requests/getComponentHighlights.js +0 -3
- package/lib/requests/getCurrentComponentSlots.d.ts +0 -1
- package/lib/requests/getCurrentComponentSlots.js +0 -3
- package/lib/requests/getDefineSlotNames.d.ts +0 -1
- package/lib/requests/getDefineSlotNames.js +0 -3
- package/lib/requests/getDefineSlots.d.ts +0 -2
- package/lib/requests/getDefineSlots.js +0 -16
- package/lib/requests/getMissingPropsDiagnostics.d.ts +0 -10
- package/lib/requests/getMissingPropsDiagnostics.js +0 -40
- package/lib/requests/getPropertiesAtLocation.d.ts +0 -2
- package/lib/requests/getPropertiesAtLocation.js +0 -63
- package/lib/requests/getReactiveVariableSpans.d.ts +0 -3
- package/lib/requests/getReactiveVariableSpans.js +0 -30
- package/lib/requests/getSemanticClassfications.d.ts +0 -3
- package/lib/requests/getSemanticClassfications.js +0 -8
- package/lib/requests/getVariableProperties.d.ts +0 -10
- package/lib/requests/getVariableProperties.js +0 -16
- package/lib/requests/isRefAtLocation.d.ts +0 -3
- package/lib/requests/isRefAtLocation.js +0 -55
- package/lib/requests/resolveModuleName.d.ts +0 -4
- package/lib/requests/resolveModuleName.js +0 -28
- package/lib/requests/types.d.ts +0 -8
- package/lib/requests/types.js +0 -3
package/index.js
CHANGED
|
@@ -127,9 +127,9 @@ module.exports = (0, createLanguageServicePlugin_1.createLanguageServicePlugin)(
|
|
|
127
127
|
});
|
|
128
128
|
session.addProtocolHandler('_vue:getReactiveReferences', request => {
|
|
129
129
|
const [fileName, position] = request.arguments;
|
|
130
|
-
const {
|
|
130
|
+
const { language } = getLanguageService(fileName);
|
|
131
131
|
const sourceScript = language.scripts.get(fileName);
|
|
132
|
-
return createResponse((0, getReactiveReferences_1.getReactiveReferences)(ts, language,
|
|
132
|
+
return createResponse((0, getReactiveReferences_1.getReactiveReferences)(ts, language, sourceScript, position, sourceScript.generated ? sourceScript.snapshot.getLength() : 0));
|
|
133
133
|
});
|
|
134
134
|
projectService.logger.info('Vue specific commands are successfully added.');
|
|
135
135
|
function createResponse(res) {
|
package/lib/common.js
CHANGED
|
@@ -125,8 +125,8 @@ function getCompletionEntryDetails(language, getCompletionEntryDetails) {
|
|
|
125
125
|
const { fileName } = args[6].__isAutoImport;
|
|
126
126
|
const sourceScript = language.scripts.get(fileName);
|
|
127
127
|
if (sourceScript?.generated?.root instanceof language_core_1.VueVirtualCode) {
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
128
|
+
const { vueSfc } = sourceScript.generated.root;
|
|
129
|
+
if (!vueSfc?.descriptor.script && !vueSfc?.descriptor.scriptSetup) {
|
|
130
130
|
for (const codeAction of details?.codeActions ?? []) {
|
|
131
131
|
for (const change of codeAction.changes) {
|
|
132
132
|
for (const textChange of change.textChanges) {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { type Language, type SourceScript } from '@vue/language-core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
start: number;
|
|
6
|
-
end: number;
|
|
7
|
-
}[];
|
|
8
|
-
dependentRanges: {
|
|
9
|
-
start: number;
|
|
10
|
-
end: number;
|
|
11
|
-
}[];
|
|
2
|
+
export declare function getReactiveReferences(ts: typeof import('typescript'), language: Language<string>, sourceScript: SourceScript<string>, position: number, leadingOffset?: number): {
|
|
3
|
+
dependencyRanges: ts.TextRange[];
|
|
4
|
+
dependentRanges: ts.TextRange[];
|
|
12
5
|
} | undefined;
|