]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: revert helpers to compiler-only
authorEvan You <yyx990803@gmail.com>
Tue, 24 Nov 2020 21:55:43 +0000 (16:55 -0500)
committerEvan You <yyx990803@gmail.com>
Wed, 25 Nov 2020 00:04:21 +0000 (19:04 -0500)
packages/runtime-core/src/apiSetupHelpers.ts

index 31130aabd9f415231e50eaac1dbc756f38a5af85..fb8e6f7a169c6a254b1cf1d3f79c7f3c52f2ec14 100644 (file)
@@ -1,4 +1,3 @@
-import { shallowReadonly } from '@vue/reactivity'
 import { getCurrentInstance, SetupContext } from './component'
 import { EmitFn, EmitsOptions } from './componentEmits'
 import { ComponentObjectPropsOptions, ExtractPropTypes } from './componentProps'
@@ -32,9 +31,7 @@ export function defineProps(props?: any) {
         `compiled away and passing it at runtime has no effect.`
     )
   }
-  return __DEV__
-    ? shallowReadonly(getCurrentInstance()!.props)
-    : getCurrentInstance()!.props
+  return null as any
 }
 
 export function defineEmit<
@@ -52,7 +49,7 @@ export function defineEmit(emitOptions?: any) {
         `compiled away and passing it at runtime has no effect.`
     )
   }
-  return getCurrentInstance()!.emit
+  return null as any
 }
 
 export function useContext(): SetupContext {