We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baa656e commit 56f5692Copy full SHA for 56f5692
packages/compiler-sfc/src/script/defineOptions.ts
@@ -37,10 +37,23 @@ export function processDefineOptions(
37
(prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') &&
38
prop.key.type === 'Identifier'
39
) {
40
- if (prop.key.name === 'props') propsOption = prop
41
- if (prop.key.name === 'emits') emitsOption = prop
42
- if (prop.key.name === 'expose') exposeOption = prop
43
- if (prop.key.name === 'slots') slotsOption = prop
+ switch (prop.key.name) {
+ case 'props':
+ propsOption = prop
+ break
44
+
45
+ case 'emits':
46
+ emitsOption = prop
47
48
49
+ case 'expose':
50
+ exposeOption = prop
51
52
53
+ case 'slots':
54
+ slotsOption = prop
55
56
+ }
57
}
58
59
0 commit comments