From: Evan You Date: Tue, 24 Nov 2020 21:55:43 +0000 (-0500) Subject: wip: revert helpers to compiler-only X-Git-Tag: v3.0.3~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdc66c7ea4794c20a7a832faeaf7e1224388403f;p=thirdparty%2Fvuejs%2Fcore.git wip: revert helpers to compiler-only --- diff --git a/packages/runtime-core/src/apiSetupHelpers.ts b/packages/runtime-core/src/apiSetupHelpers.ts index 31130aabd9..fb8e6f7a16 100644 --- a/packages/runtime-core/src/apiSetupHelpers.ts +++ b/packages/runtime-core/src/apiSetupHelpers.ts @@ -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 {