@vue/language-core 2.1.4 → 2.1.6-patch.1
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/lib/codegen/common.d.ts +2 -2
- package/lib/codegen/common.js +8 -10
- package/lib/codegen/globalTypes.d.ts +1 -1
- package/lib/codegen/globalTypes.js +123 -125
- package/lib/codegen/script/component.js +38 -32
- package/lib/codegen/script/{internalComponent.d.ts → componentSelf.d.ts} +1 -1
- package/lib/codegen/script/{internalComponent.js → componentSelf.js} +6 -6
- package/lib/codegen/script/index.d.ts +1 -0
- package/lib/codegen/script/index.js +14 -6
- package/lib/codegen/script/scriptSetup.js +10 -37
- package/lib/codegen/script/styleModulesType.d.ts +4 -0
- package/lib/codegen/script/styleModulesType.js +36 -0
- package/lib/codegen/script/template.d.ts +3 -3
- package/lib/codegen/script/template.js +56 -67
- package/lib/codegen/template/context.d.ts +2 -0
- package/lib/codegen/template/context.js +3 -0
- package/lib/codegen/template/element.js +15 -6
- package/lib/codegen/template/elementDirectives.js +1 -1
- package/lib/codegen/template/elementEvents.js +4 -1
- package/lib/codegen/template/elementProps.js +28 -19
- package/lib/codegen/template/index.d.ts +3 -2
- package/lib/codegen/template/index.js +63 -53
- package/lib/codegen/template/interpolation.d.ts +1 -1
- package/lib/codegen/template/interpolation.js +52 -26
- package/lib/codegen/template/templateChild.js +4 -0
- package/lib/parsers/scriptRanges.d.ts +1 -0
- package/lib/parsers/scriptRanges.js +7 -2
- package/lib/parsers/scriptSetupRanges.d.ts +2 -1
- package/lib/parsers/scriptSetupRanges.js +12 -2
- package/lib/plugins/vue-sfc-template.js +2 -2
- package/lib/plugins/vue-tsx.d.ts +5 -1
- package/lib/plugins/vue-tsx.js +37 -10
- package/lib/types.d.ts +2 -2
- package/lib/utils/ts.d.ts +8 -2
- package/lib/utils/ts.js +45 -8
- package/package.json +5 -6
- package/lib/codegen/script/globalTypes.d.ts +0 -2
- package/lib/codegen/script/globalTypes.js +0 -147
- package/lib/codegen/template/vBindShorthand.d.ts +0 -3
- package/lib/codegen/template/vBindShorthand.js +0 -18
package/lib/utils/ts.js
CHANGED
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createParsedCommandLineByJson = createParsedCommandLineByJson;
|
|
4
4
|
exports.createParsedCommandLine = createParsedCommandLine;
|
|
5
5
|
exports.resolveVueCompilerOptions = resolveVueCompilerOptions;
|
|
6
|
+
exports.setupGlobalTypes = setupGlobalTypes;
|
|
6
7
|
const shared_1 = require("@vue/shared");
|
|
7
|
-
const
|
|
8
|
+
const path_browserify_1 = require("path-browserify");
|
|
8
9
|
const languagePlugin_1 = require("../languagePlugin");
|
|
9
|
-
|
|
10
|
+
const globalTypes_1 = require("../codegen/globalTypes");
|
|
11
|
+
function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, configFileName = rootDir + '/jsconfig.json', skipGlobalTypesSetup = false) {
|
|
10
12
|
const proxyHost = proxyParseConfigHostForExtendConfigPaths(parseConfigHost);
|
|
11
13
|
ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName);
|
|
12
14
|
let vueOptions = {};
|
|
@@ -20,6 +22,12 @@ function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, confi
|
|
|
20
22
|
catch (err) { }
|
|
21
23
|
}
|
|
22
24
|
const resolvedVueOptions = resolveVueCompilerOptions(vueOptions);
|
|
25
|
+
if (skipGlobalTypesSetup) {
|
|
26
|
+
resolvedVueOptions.__setupedGlobalTypes = true;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
resolvedVueOptions.__setupedGlobalTypes = setupGlobalTypes(rootDir, resolvedVueOptions, parseConfigHost);
|
|
30
|
+
}
|
|
23
31
|
const parsed = ts.parseJsonConfigFileContent(json, proxyHost.host, rootDir, {}, configFileName, undefined, (0, languagePlugin_1.getAllExtensions)(resolvedVueOptions)
|
|
24
32
|
.map(extension => ({
|
|
25
33
|
extension: extension.slice(1),
|
|
@@ -35,11 +43,11 @@ function createParsedCommandLineByJson(ts, parseConfigHost, rootDir, json, confi
|
|
|
35
43
|
vueOptions: resolvedVueOptions,
|
|
36
44
|
};
|
|
37
45
|
}
|
|
38
|
-
function createParsedCommandLine(ts, parseConfigHost, tsConfigPath) {
|
|
46
|
+
function createParsedCommandLine(ts, parseConfigHost, tsConfigPath, skipGlobalTypesSetup = false) {
|
|
39
47
|
try {
|
|
40
48
|
const proxyHost = proxyParseConfigHostForExtendConfigPaths(parseConfigHost);
|
|
41
49
|
const config = ts.readJsonConfigFile(tsConfigPath, proxyHost.host.readFile);
|
|
42
|
-
ts.parseJsonSourceFileConfigFileContent(config, proxyHost.host,
|
|
50
|
+
ts.parseJsonSourceFileConfigFileContent(config, proxyHost.host, path_browserify_1.posix.dirname(tsConfigPath), {}, tsConfigPath);
|
|
43
51
|
let vueOptions = {};
|
|
44
52
|
for (const extendPath of proxyHost.extendConfigPaths.reverse()) {
|
|
45
53
|
try {
|
|
@@ -51,7 +59,13 @@ function createParsedCommandLine(ts, parseConfigHost, tsConfigPath) {
|
|
|
51
59
|
catch (err) { }
|
|
52
60
|
}
|
|
53
61
|
const resolvedVueOptions = resolveVueCompilerOptions(vueOptions);
|
|
54
|
-
|
|
62
|
+
if (skipGlobalTypesSetup) {
|
|
63
|
+
resolvedVueOptions.__setupedGlobalTypes = true;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
resolvedVueOptions.__setupedGlobalTypes = setupGlobalTypes(path_browserify_1.posix.dirname(tsConfigPath), resolvedVueOptions, parseConfigHost);
|
|
67
|
+
}
|
|
68
|
+
const parsed = ts.parseJsonSourceFileConfigFileContent(config, proxyHost.host, path_browserify_1.posix.dirname(tsConfigPath), {}, tsConfigPath, undefined, (0, languagePlugin_1.getAllExtensions)(resolvedVueOptions)
|
|
55
69
|
.map(extension => ({
|
|
56
70
|
extension: extension.slice(1),
|
|
57
71
|
isMixedContent: true,
|
|
@@ -97,7 +111,7 @@ function proxyParseConfigHostForExtendConfigPaths(parseConfigHost) {
|
|
|
97
111
|
};
|
|
98
112
|
}
|
|
99
113
|
function getPartialVueCompilerOptions(ts, tsConfigSourceFile) {
|
|
100
|
-
const folder =
|
|
114
|
+
const folder = path_browserify_1.posix.dirname(tsConfigSourceFile.fileName);
|
|
101
115
|
const obj = ts.convertToObject(tsConfigSourceFile, []);
|
|
102
116
|
const rawOptions = obj?.vueCompilerOptions ?? {};
|
|
103
117
|
const result = {
|
|
@@ -181,11 +195,12 @@ function resolveVueCompilerOptions(vueOptions) {
|
|
|
181
195
|
defineModel: ['defineModel'],
|
|
182
196
|
defineOptions: ['defineOptions'],
|
|
183
197
|
withDefaults: ['withDefaults'],
|
|
184
|
-
templateRef: ['templateRef', 'useTemplateRef'],
|
|
185
198
|
...vueOptions.macros,
|
|
186
199
|
},
|
|
187
200
|
composibles: {
|
|
188
|
-
useCssModule: ['useCssModule']
|
|
201
|
+
useCssModule: ['useCssModule'],
|
|
202
|
+
useTemplateRef: ['useTemplateRef', 'templateRef'],
|
|
203
|
+
...vueOptions.composibles,
|
|
189
204
|
},
|
|
190
205
|
plugins: vueOptions.plugins ?? [],
|
|
191
206
|
// experimental
|
|
@@ -205,4 +220,26 @@ function resolveVueCompilerOptions(vueOptions) {
|
|
|
205
220
|
}).map(([k, v]) => [(0, shared_1.camelize)(k), v])),
|
|
206
221
|
};
|
|
207
222
|
}
|
|
223
|
+
function setupGlobalTypes(rootDir, vueOptions, host) {
|
|
224
|
+
if (!host.writeFile) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
try {
|
|
228
|
+
let dir = rootDir;
|
|
229
|
+
while (!host.fileExists(path_browserify_1.posix.join(dir, 'node_modules', vueOptions.lib, 'package.json'))) {
|
|
230
|
+
const parentDir = path_browserify_1.posix.dirname(dir);
|
|
231
|
+
if (dir === parentDir) {
|
|
232
|
+
throw 0;
|
|
233
|
+
}
|
|
234
|
+
dir = parentDir;
|
|
235
|
+
}
|
|
236
|
+
const globalTypesPath = path_browserify_1.posix.join(dir, 'node_modules', '.vue-global-types', `${vueOptions.lib}_${vueOptions.target}_${vueOptions.strictTemplates}.d.ts`);
|
|
237
|
+
const globalTypesContents = `// @ts-nocheck\nexport {};\n` + (0, globalTypes_1.generateGlobalTypes)(vueOptions.lib, vueOptions.target, vueOptions.strictTemplates);
|
|
238
|
+
host.writeFile(globalTypesPath, globalTypesContents);
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
208
245
|
//# sourceMappingURL=ts.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6-patch.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@volar/language-core": "~2.4.1",
|
|
16
|
-
"@vue/compiler-dom": "^3.
|
|
16
|
+
"@vue/compiler-dom": "^3.5.2",
|
|
17
17
|
"@vue/compiler-vue2": "^2.7.16",
|
|
18
|
-
"@vue/shared": "^3.
|
|
18
|
+
"@vue/shared": "^3.5.2",
|
|
19
19
|
"computeds": "^0.0.1",
|
|
20
20
|
"minimatch": "^9.0.3",
|
|
21
21
|
"muggle-string": "^0.4.1",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/node": "latest",
|
|
27
27
|
"@types/path-browserify": "^1.0.1",
|
|
28
28
|
"@volar/typescript": "~2.4.1",
|
|
29
|
-
"@vue/compiler-sfc": "^3.
|
|
29
|
+
"@vue/compiler-sfc": "^3.5.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"typescript": "*"
|
|
@@ -35,6 +35,5 @@
|
|
|
35
35
|
"typescript": {
|
|
36
36
|
"optional": true
|
|
37
37
|
}
|
|
38
|
-
}
|
|
39
|
-
"gitHead": "5e197d08eaef57209ff2927c943ba1db3bf4eff6"
|
|
38
|
+
}
|
|
40
39
|
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateGlobalTypes = generateGlobalTypes;
|
|
4
|
-
const shared_1 = require("../../utils/shared");
|
|
5
|
-
function generateGlobalTypes(vueCompilerOptions) {
|
|
6
|
-
const fnPropsType = `(K extends { $props: infer Props } ? Props : any)${vueCompilerOptions.strictTemplates ? '' : ' & Record<string, unknown>'}`;
|
|
7
|
-
return `export const __VLS_globalTypesStart = {};
|
|
8
|
-
declare module '${vueCompilerOptions.lib}' {
|
|
9
|
-
interface GlobalComponents {}
|
|
10
|
-
}
|
|
11
|
-
declare global {
|
|
12
|
-
type __VLS_IntrinsicElements = ${vueCompilerOptions.target >= 3.3
|
|
13
|
-
? `import('${vueCompilerOptions.lib}/jsx-runtime').JSX.IntrinsicElements;`
|
|
14
|
-
: `globalThis.JSX.IntrinsicElements;`}
|
|
15
|
-
type __VLS_Element = ${vueCompilerOptions.target >= 3.3
|
|
16
|
-
? `import('${vueCompilerOptions.lib}/jsx-runtime').JSX.Element;`
|
|
17
|
-
: `globalThis.JSX.Element;`}
|
|
18
|
-
type __VLS_GlobalComponents = ${vueCompilerOptions.target >= 3.5
|
|
19
|
-
? `import('${vueCompilerOptions.lib}').GlobalComponents;`
|
|
20
|
-
: `import('${vueCompilerOptions.lib}').GlobalComponents & Pick<typeof import('${vueCompilerOptions.lib}'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>;`}
|
|
21
|
-
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
|
22
|
-
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
|
23
|
-
|
|
24
|
-
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
|
25
|
-
|
|
26
|
-
// v-for
|
|
27
|
-
function __VLS_getVForSourceType(source: number): [number, number, number][];
|
|
28
|
-
function __VLS_getVForSourceType(source: string): [string, number, number][];
|
|
29
|
-
function __VLS_getVForSourceType<T extends any[]>(source: T): [
|
|
30
|
-
item: T[number],
|
|
31
|
-
key: number,
|
|
32
|
-
index: number,
|
|
33
|
-
][];
|
|
34
|
-
function __VLS_getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [
|
|
35
|
-
item: T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never,
|
|
36
|
-
key: number,
|
|
37
|
-
index: undefined,
|
|
38
|
-
][];
|
|
39
|
-
// #3845
|
|
40
|
-
function __VLS_getVForSourceType<T extends number | { [Symbol.iterator](): Iterator<any> }>(source: T): [
|
|
41
|
-
item: number | (Exclude<T, number> extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never),
|
|
42
|
-
key: number,
|
|
43
|
-
index: undefined,
|
|
44
|
-
][];
|
|
45
|
-
function __VLS_getVForSourceType<T>(source: T): [
|
|
46
|
-
item: T[keyof T],
|
|
47
|
-
key: keyof T,
|
|
48
|
-
index: number,
|
|
49
|
-
][];
|
|
50
|
-
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
|
55
|
-
|
|
56
|
-
// Custom Directives
|
|
57
|
-
type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
|
58
|
-
function __VLS_directiveAsFunction<T extends import('${vueCompilerOptions.lib}').Directive>(dir: T): T extends (...args: any) => any
|
|
59
|
-
? T | __VLS_unknownDirective
|
|
60
|
-
: NonNullable<(T & Record<string, __VLS_unknownDirective>)['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>;
|
|
61
|
-
const __VLS_directiveBindingRestFields = { instance: null, oldValue: null, modifiers: null as any, dir: null as any };
|
|
62
|
-
|
|
63
|
-
function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
|
|
64
|
-
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
|
65
|
-
function __VLS_nonNullable<T>(t: T): T extends null | undefined ? never : T;
|
|
66
|
-
|
|
67
|
-
type __VLS_SelfComponent<N, C> = string extends N ? {} : N extends string ? { [P in N]: C } : {};
|
|
68
|
-
type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> =
|
|
69
|
-
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
|
70
|
-
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
|
71
|
-
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
|
|
72
|
-
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
|
|
73
|
-
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
|
74
|
-
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
|
75
|
-
${vueCompilerOptions.strictTemplates ? '{}' : '{ [K in N0]: unknown }'}
|
|
76
|
-
|
|
77
|
-
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
|
78
|
-
T extends new (...args: any) => any
|
|
79
|
-
? (props: ${fnPropsType}, ctx?: any) => __VLS_Element & { __ctx?: {
|
|
80
|
-
attrs?: any,
|
|
81
|
-
slots?: K extends { ${(0, shared_1.getSlotsPropertyName)(vueCompilerOptions.target)}: infer Slots } ? Slots : any,
|
|
82
|
-
emit?: K extends { $emit: infer Emit } ? Emit : any
|
|
83
|
-
} & { props?: ${fnPropsType}; expose?(exposed: K): void; } }
|
|
84
|
-
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
|
85
|
-
: T extends (...args: any) => any ? T
|
|
86
|
-
: (_: {}${vueCompilerOptions.strictTemplates ? '' : ' & Record<string, unknown>'}, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {}${vueCompilerOptions.strictTemplates ? '' : ' & Record<string, unknown>'} } };
|
|
87
|
-
function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T${vueCompilerOptions.strictTemplates ? '' : ' & Record<string, unknown>'}) => void;
|
|
88
|
-
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): Parameters<T>['length'] extends 2 ? [any] : [];
|
|
89
|
-
function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): __VLS_PickNotAny<
|
|
90
|
-
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
|
91
|
-
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
|
92
|
-
>;
|
|
93
|
-
type __VLS_FunctionalComponentProps<T, K> =
|
|
94
|
-
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
|
95
|
-
: T extends (props: infer P, ...args: any) => any ? P :
|
|
96
|
-
{};
|
|
97
|
-
type __VLS_IsFunction<T, K> = K extends keyof T
|
|
98
|
-
? __VLS_IsAny<T[K]> extends false
|
|
99
|
-
? unknown extends T[K]
|
|
100
|
-
? false
|
|
101
|
-
: true
|
|
102
|
-
: false
|
|
103
|
-
: false;
|
|
104
|
-
|
|
105
|
-
function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
|
|
106
|
-
function __VLS_tryAsConstant<const T>(t: T): T;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* emit
|
|
110
|
-
*/
|
|
111
|
-
// fix https://github.com/vuejs/language-tools/issues/926
|
|
112
|
-
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
|
113
|
-
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
|
|
114
|
-
? U extends T
|
|
115
|
-
? never
|
|
116
|
-
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
|
|
117
|
-
: never;
|
|
118
|
-
type __VLS_OverloadUnion<T> = Exclude<
|
|
119
|
-
__VLS_OverloadUnionInner<(() => never) & T>,
|
|
120
|
-
T extends () => never ? never : () => never
|
|
121
|
-
>;
|
|
122
|
-
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
|
|
123
|
-
? F extends (event: infer E, ...args: infer A) => any
|
|
124
|
-
? { [K in E & string]: (...args: A) => void; }
|
|
125
|
-
: never
|
|
126
|
-
: never;
|
|
127
|
-
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
|
|
128
|
-
__VLS_UnionToIntersection<
|
|
129
|
-
__VLS_ConstructorOverloads<T> & {
|
|
130
|
-
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
|
|
131
|
-
}
|
|
132
|
-
>
|
|
133
|
-
>;
|
|
134
|
-
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
|
135
|
-
type __VLS_PickRefsExpose<T> = T extends object
|
|
136
|
-
? { [K in keyof T]: (T[K] extends any[]
|
|
137
|
-
? Parameters<T[K][0]['expose']>[0][]
|
|
138
|
-
: T[K] extends { expose?: (exposed: infer E) => void }
|
|
139
|
-
? E
|
|
140
|
-
: T[K]) | null }
|
|
141
|
-
: never;
|
|
142
|
-
}
|
|
143
|
-
export const __VLS_globalTypesEnd = {};
|
|
144
|
-
`;
|
|
145
|
-
}
|
|
146
|
-
;
|
|
147
|
-
//# sourceMappingURL=globalTypes.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateVBindShorthandInlayHint = generateVBindShorthandInlayHint;
|
|
4
|
-
function generateVBindShorthandInlayHint(loc, variableName) {
|
|
5
|
-
return {
|
|
6
|
-
blockName: 'template',
|
|
7
|
-
offset: loc.end.offset,
|
|
8
|
-
setting: 'vue.inlayHints.vBindShorthand',
|
|
9
|
-
label: `="${variableName}"`,
|
|
10
|
-
tooltip: [
|
|
11
|
-
`This is a shorthand for \`${loc.source}="${variableName}"\`.`,
|
|
12
|
-
'To hide this hint, set `vue.inlayHints.vBindShorthand` to `false` in IDE settings.',
|
|
13
|
-
'[More info](https://github.com/vuejs/core/pull/9451)',
|
|
14
|
-
].join('\n\n'),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
;
|
|
18
|
-
//# sourceMappingURL=vBindShorthand.js.map
|