File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
packages/compiler-sfc/src Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ export {
33
33
34
34
// Internals for type resolution
35
35
export { invalidateTypeCache , registerTS } from './script/resolveType'
36
+ export { extractRuntimeProps } from './script/defineProps'
37
+ export { extractRuntimeEmits } from './script/defineEmits'
36
38
37
39
// Types
38
40
export type {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export function genRuntimeEmits(ctx: ScriptCompileContext): string | undefined {
57
57
return emitsDecl
58
58
}
59
59
60
- function extractRuntimeEmits ( ctx : ScriptCompileContext ) : Set < string > {
60
+ export function extractRuntimeEmits ( ctx : ScriptCompileContext ) : Set < string > {
61
61
const emits = new Set < string > ( )
62
62
const node = ctx . emitsTypeDecl !
63
63
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export function genRuntimeProps(ctx: ScriptCompileContext): string | undefined {
150
150
}
151
151
}
152
152
} else if ( ctx . propsTypeDecl ) {
153
- propsDecls = genRuntimePropsFromTypes ( ctx )
153
+ propsDecls = extractRuntimeProps ( ctx )
154
154
}
155
155
156
156
const modelsDecls = genModelProps ( ctx )
@@ -162,7 +162,9 @@ export function genRuntimeProps(ctx: ScriptCompileContext): string | undefined {
162
162
}
163
163
}
164
164
165
- function genRuntimePropsFromTypes ( ctx : ScriptCompileContext ) {
165
+ export function extractRuntimeProps (
166
+ ctx : ScriptCompileContext
167
+ ) : string | undefined {
166
168
// this is only called if propsTypeDecl exists
167
169
const props = resolveRuntimePropsFromType ( ctx , ctx . propsTypeDecl ! )
168
170
if ( ! props . length ) {
You can’t perform that action at this time.
0 commit comments