|
@@ -27,8 +27,8 @@ export function defineProps<
|
|
|
InferredProps = ExtractPropTypes<PP>
|
|
InferredProps = ExtractPropTypes<PP>
|
|
|
>(props?: PP): Readonly<TypeProps extends undefined ? InferredProps : TypeProps>
|
|
>(props?: PP): Readonly<TypeProps extends undefined ? InferredProps : TypeProps>
|
|
|
// implementation
|
|
// implementation
|
|
|
-export function defineProps(props?: any) {
|
|
|
|
|
- if (__DEV__ && props) {
|
|
|
|
|
|
|
+export function defineProps() {
|
|
|
|
|
+ if (__DEV__) {
|
|
|
warn(
|
|
warn(
|
|
|
`defineProps() is a compiler-hint helper that is only usable inside ` +
|
|
`defineProps() is a compiler-hint helper that is only usable inside ` +
|
|
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
@@ -45,8 +45,8 @@ export function defineEmit<
|
|
|
InferredEmit = EmitFn<E>
|
|
InferredEmit = EmitFn<E>
|
|
|
>(emitOptions?: E | EE[]): TypeEmit extends undefined ? InferredEmit : TypeEmit
|
|
>(emitOptions?: E | EE[]): TypeEmit extends undefined ? InferredEmit : TypeEmit
|
|
|
// implementation
|
|
// implementation
|
|
|
-export function defineEmit(emitOptions?: any) {
|
|
|
|
|
- if (__DEV__ && emitOptions) {
|
|
|
|
|
|
|
+export function defineEmit() {
|
|
|
|
|
+ if (__DEV__) {
|
|
|
warn(
|
|
warn(
|
|
|
`defineEmit() is a compiler-hint helper that is only usable inside ` +
|
|
`defineEmit() is a compiler-hint helper that is only usable inside ` +
|
|
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
`<script setup> of a single file component. Its arguments should be ` +
|