Skip to content

Instantly share code, notes, and snippets.

@asoglovo
Last active February 26, 2020 07:42
Show Gist options
  • Save asoglovo/27da6e2936dd5bd359c62ed0b9df75f2 to your computer and use it in GitHub Desktop.
Save asoglovo/27da6e2936dd5bd359c62ed0b9df75f2 to your computer and use it in GitHub Desktop.
Vue 3 finishComponentSetup function (runtime-core > component.ts) with some elided details
function finishComponentSetup(
instance: ComponentInternalInstance
/* elided argument */
) {
const Component = instance.type as ComponentOptions
if (Component.template && !Component.render) {
Component.render = compile!(Component.template /* elided arg */)
}
/* elided details */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment