vue3-yuanma/packages/renderer-dom/src/index.ts

47 lines
770 B
TypeScript
Raw Normal View History

2018-09-19 23:35:38 +08:00
import {
h,
cloneVNode,
createPortal,
Component,
createRenderer
} from '@vue/core'
import { queueJob, nextTick } from '@vue/scheduler'
import { nodeOps } from './nodeOps'
import { patchData } from './patchData'
import { teardownVNode } from './teardownVNode'
const { render } = createRenderer({
queueJob,
nodeOps,
patchData,
teardownVNode
})
// important: inline the definition for nextTick
const publicNextTick = nextTick as (fn: Function) => Promise<void>
2018-09-20 00:26:50 +08:00
export {
h,
cloneVNode,
createPortal,
Component,
render,
publicNextTick as nextTick
}
2018-09-19 23:35:38 +08:00
// also expose observer API
export {
autorun,
stop,
observable,
immutable,
computed,
isObservable,
isImmutable,
markImmutable,
markNonReactive,
unwrap
} from '@vue/core'