Parcourir la source

chore: remove deprecated ref sugar warning

Evan You il y a 3 ans
Parent
commit
7b2ff1e207
2 fichiers modifiés avec 1 ajouts et 16 suppressions
  1. 0 15
      packages/compiler-sfc/src/compileScript.ts
  2. 1 1
      packages/vue/ref-macros.d.ts

+ 0 - 15
packages/compiler-sfc/src/compileScript.ts

@@ -505,21 +505,6 @@ export function compileScript(
 
   // 2.2 process <script setup> body
   for (const node of scriptSetupAst.body) {
-    // (Dropped) `ref: x` bindings
-    // TODO remove when out of experimental
-    if (
-      node.type === 'LabeledStatement' &&
-      node.label.name === 'ref' &&
-      node.body.type === 'ExpressionStatement'
-    ) {
-      ctx.error(
-        `ref sugar using the label syntax was an experimental proposal and ` +
-          `has been dropped based on community feedback. Please check out ` +
-          `the new proposal at https://github.com/vuejs/rfcs/discussions/369`,
-        node
-      )
-    }
-
     if (node.type === 'ExpressionStatement') {
       const expr = unwrapTSNode(node.expression)
       // process `defineProps` and `defineEmit(s)` calls

+ 1 - 1
packages/vue/ref-macros.d.ts

@@ -1,2 +1,2 @@
-// TODO deprecated file - to be removed when out of experimental
+// TODO remove in 3.4
 import './macros-global'