mirror of https://github.com/vuejs/core.git
wip: revert helpers to compiler-only
This commit is contained in:
parent
faed98972c
commit
bdc66c7ea4
|
@ -1,4 +1,3 @@
|
||||||
import { shallowReadonly } from '@vue/reactivity'
|
|
||||||
import { getCurrentInstance, SetupContext } from './component'
|
import { getCurrentInstance, SetupContext } from './component'
|
||||||
import { EmitFn, EmitsOptions } from './componentEmits'
|
import { EmitFn, EmitsOptions } from './componentEmits'
|
||||||
import { ComponentObjectPropsOptions, ExtractPropTypes } from './componentProps'
|
import { ComponentObjectPropsOptions, ExtractPropTypes } from './componentProps'
|
||||||
|
@ -32,9 +31,7 @@ export function defineProps(props?: any) {
|
||||||
`compiled away and passing it at runtime has no effect.`
|
`compiled away and passing it at runtime has no effect.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return __DEV__
|
return null as any
|
||||||
? shallowReadonly(getCurrentInstance()!.props)
|
|
||||||
: getCurrentInstance()!.props
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function defineEmit<
|
export function defineEmit<
|
||||||
|
@ -52,7 +49,7 @@ export function defineEmit(emitOptions?: any) {
|
||||||
`compiled away and passing it at runtime has no effect.`
|
`compiled away and passing it at runtime has no effect.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return getCurrentInstance()!.emit
|
return null as any
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useContext(): SetupContext {
|
export function useContext(): SetupContext {
|
||||||
|
|
Loading…
Reference in New Issue