@vue/compiler-sfc 3.2.19 → 3.2.23
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/dist/compiler-sfc.cjs.js +14124 -13986
- package/dist/compiler-sfc.d.ts +29 -1
- package/dist/compiler-sfc.esm-browser.js +19998 -19512
- package/package.json +6 -6
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -76,6 +76,14 @@ export { extractIdentifiers }
|
|
|
76
76
|
|
|
77
77
|
export { generateCodeFrame }
|
|
78
78
|
|
|
79
|
+
declare interface ImportBinding {
|
|
80
|
+
isType: boolean;
|
|
81
|
+
imported: string;
|
|
82
|
+
source: string;
|
|
83
|
+
isFromSetup: boolean;
|
|
84
|
+
isUsedInTemplate: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
79
87
|
export { isInDestructureAssignment }
|
|
80
88
|
|
|
81
89
|
export { isStaticProperty }
|
|
@@ -117,7 +125,20 @@ export declare interface SFCDescriptor {
|
|
|
117
125
|
styles: SFCStyleBlock[];
|
|
118
126
|
customBlocks: SFCBlock[];
|
|
119
127
|
cssVars: string[];
|
|
128
|
+
/**
|
|
129
|
+
* whether the SFC uses :slotted() modifier.
|
|
130
|
+
* this is used as a compiler optimization hint.
|
|
131
|
+
*/
|
|
120
132
|
slotted: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* compare with an existing descriptor to determine whether HMR should perform
|
|
135
|
+
* a reload vs. re-render.
|
|
136
|
+
*
|
|
137
|
+
* Note: this comparison assumes the prev/next script are already identical,
|
|
138
|
+
* and only checks the special case where <script setup lang="ts"> unused import
|
|
139
|
+
* pruning result changes due to template changes.
|
|
140
|
+
*/
|
|
141
|
+
shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean;
|
|
121
142
|
}
|
|
122
143
|
|
|
123
144
|
export declare interface SFCParseOptions {
|
|
@@ -138,6 +159,7 @@ export declare interface SFCScriptBlock extends SFCBlock {
|
|
|
138
159
|
type: 'script';
|
|
139
160
|
setup?: string | boolean;
|
|
140
161
|
bindings?: BindingMetadata;
|
|
162
|
+
imports?: Record<string, ImportBinding>;
|
|
141
163
|
/**
|
|
142
164
|
* import('\@babel/types').Statement
|
|
143
165
|
*/
|
|
@@ -169,9 +191,15 @@ export declare interface SFCScriptCompileOptions {
|
|
|
169
191
|
/**
|
|
170
192
|
* (Experimental) Enable syntax transform for using refs without `.value`
|
|
171
193
|
* https://github.com/vuejs/rfcs/discussions/369
|
|
172
|
-
* @default
|
|
194
|
+
* @default false
|
|
173
195
|
*/
|
|
174
196
|
refTransform?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* (Experimental) Enable syntax transform for destructuring from defineProps()
|
|
199
|
+
* https://github.com/vuejs/rfcs/discussions/394
|
|
200
|
+
* @default false
|
|
201
|
+
*/
|
|
202
|
+
propsDestructureTransform?: boolean;
|
|
175
203
|
/**
|
|
176
204
|
* @deprecated use `refTransform` instead.
|
|
177
205
|
*/
|