feat(sfc): add defineEmits and deprecate defineEmit (#3725)

This commit is contained in:
Eduardo San Martin Morote
2021-06-22 21:02:56 +02:00
committed by GitHub
parent 6b6d566861
commit a137da8a9f
8 changed files with 102 additions and 54 deletions

View File

@@ -54,7 +54,7 @@ return { a }
}"
`;
exports[`SFC compile <script setup> defineEmit() 1`] = `
exports[`SFC compile <script setup> defineEmits() 1`] = `
"export default {
expose: [],
emits: ['foo', 'bar'],
@@ -720,7 +720,7 @@ return { a, b, c, d, x }
}"
`;
exports[`SFC compile <script setup> with TypeScript defineEmit w/ type (type literal w/ call signatures) 1`] = `
exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (type literal w/ call signatures) 1`] = `
"import { defineComponent as _defineComponent } from 'vue'
@@ -741,7 +741,7 @@ return { emit }
})"
`;
exports[`SFC compile <script setup> with TypeScript defineEmit w/ type 1`] = `
exports[`SFC compile <script setup> with TypeScript defineEmits w/ type 1`] = `
"import { defineComponent as _defineComponent } from 'vue'