refactor: expose scheduler for vapor
This commit is contained in:
parent
783d8b4d0d
commit
9d89d7ab27
|
@ -488,3 +488,4 @@ export const DeprecationTypes = (
|
|||
// change without notice between versions. User code should never rely on them.
|
||||
|
||||
export { baseNormalizePropsOptions, resolvePropValue } from './componentProps'
|
||||
export { type SchedulerJob, queueJob } from './scheduler'
|
||||
|
|
|
@ -24,6 +24,9 @@ export enum SchedulerJobFlags {
|
|||
DISPOSED = 1 << 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface SchedulerJob extends Function {
|
||||
id?: number
|
||||
/**
|
||||
|
@ -91,6 +94,9 @@ function findInsertionIndex(id: number) {
|
|||
return start
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal for runtime-vapor only
|
||||
*/
|
||||
export function queueJob(job: SchedulerJob): void {
|
||||
if (!(job.flags! & SchedulerJobFlags.QUEUED)) {
|
||||
const jobId = getId(job)
|
||||
|
|
|
@ -61,10 +61,6 @@ interface ComponentInternalOptions {
|
|||
* @internal
|
||||
*/
|
||||
__hmrId?: string
|
||||
/**
|
||||
* Compat build only, for bailing out of certain compatibility behavior
|
||||
*/
|
||||
__isBuiltIn?: boolean
|
||||
/**
|
||||
* This one should be exposed so that devtools can make use of it
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import { ReactiveEffect } from '@vue/reactivity'
|
||||
import {
|
||||
type SchedulerJob,
|
||||
queueJob,
|
||||
} from '../../../runtime-core/src/scheduler'
|
||||
import { type SchedulerJob, queueJob } from '@vue/runtime-core'
|
||||
import { currentInstance } from './component'
|
||||
|
||||
export function renderEffect(fn: () => void): void {
|
||||
|
|
Loading…
Reference in New Issue