vue3-yuanma/packages/runtime-test/src/index.ts

30 lines
817 B
TypeScript
Raw Normal View History

import {
createRenderer,
VNode,
RootRenderFunction,
CreateAppFunction
} from '@vue/runtime-core'
2019-09-07 04:58:32 +08:00
import { nodeOps, TestNode, TestElement } from './nodeOps'
2019-06-20 21:28:37 +08:00
import { patchProp } from './patchProp'
2019-08-27 06:08:56 +08:00
import { serializeInner } from './serialize'
2018-10-02 01:15:07 +08:00
const { render: baseRender, createApp: baseCreateApp } = createRenderer({
2019-06-20 21:28:37 +08:00
patchProp,
...nodeOps
2019-09-07 04:58:32 +08:00
})
2019-09-03 04:09:34 +08:00
export const render = baseRender as RootRenderFunction<TestNode, TestElement>
export const createApp = baseCreateApp as CreateAppFunction<TestElement>
2019-08-27 06:08:56 +08:00
// convenience for one-off render validations
export function renderToString(vnode: VNode) {
const root = nodeOps.createElement('div')
render(vnode, root)
return serializeInner(root)
}
export * from './triggerEvent'
export * from './serialize'
2018-10-02 01:15:07 +08:00
export * from './nodeOps'
2018-10-27 03:44:50 +08:00
export * from '@vue/runtime-core'