File tree Expand file tree Collapse file tree 4 files changed +15
-8
lines changed
compiler-core/src/transforms Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ export function processFor(
263
263
dir : DirectiveNode ,
264
264
context : TransformContext ,
265
265
processCodegen ?: ( forNode : ForNode ) => ( ( ) => void ) | undefined ,
266
- ) {
266
+ ) : ( ( ) => void ) | undefined {
267
267
if ( ! dir . exp ) {
268
268
context . onError (
269
269
createCompilerError ( ErrorCodes . X_V_FOR_NO_EXPRESSION , dir . loc ) ,
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ export function processDefineModel(
114
114
return true
115
115
}
116
116
117
- export function genModelProps ( ctx : ScriptCompileContext ) {
117
+ export function genModelProps ( ctx : ScriptCompileContext ) : string | undefined {
118
118
if ( ! ctx . hasDefineModelCall ) return
119
119
120
120
const isProd = ! ! ctx . options . isProd
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ export function proxyRefs<T extends object>(
275
275
objectWithRefs : T ,
276
276
) : ShallowUnwrapRef < T > {
277
277
return isReactive ( objectWithRefs )
278
- ? objectWithRefs
278
+ ? ( objectWithRefs as any )
279
279
: new Proxy ( objectWithRefs , shallowUnwrapHandlers )
280
280
}
281
281
Original file line number Diff line number Diff line change @@ -47,16 +47,21 @@ const pendingPostFlushCbs: SchedulerJob[] = []
47
47
let activePostFlushCbs : SchedulerJob [ ] | null = null
48
48
let postFlushIndex = 0
49
49
50
- const resolvedPromise = /*@__PURE__ */ Promise . resolve ( ) as Promise < any >
50
+ const resolvedPromise = /*@__PURE__ */ Promise . resolve ( )
51
51
let currentFlushPromise : Promise < void > | null = null
52
52
53
53
const RECURSION_LIMIT = 100
54
54
type CountMap = Map < SchedulerJob , number >
55
55
56
- export function nextTick < T = void , R = void > (
56
+ export function nextTick ( ) : Promise < void >
57
+ export function nextTick < T , R > (
57
58
this : T ,
58
- fn ?: ( this : T ) => R ,
59
- ) : Promise < Awaited < R > > {
59
+ fn : ( this : T ) => R | Promise < R > ,
60
+ ) : Promise < R >
61
+ export function nextTick < T , R > (
62
+ this : T ,
63
+ fn ?: ( this : T ) => R | Promise < R > ,
64
+ ) : Promise < void | R > {
60
65
const p = currentFlushPromise || resolvedPromise
61
66
return fn ? p . then ( this ? fn . bind ( this ) : fn ) : p
62
67
}
@@ -113,7 +118,9 @@ export function queueJob(job: SchedulerJob): void {
113
118
114
119
function queueFlush ( ) {
115
120
if ( ! currentFlushPromise ) {
116
- currentFlushPromise = resolvedPromise . then ( flushJobs )
121
+ currentFlushPromise = resolvedPromise . then ( ( ) => {
122
+ flushJobs ( )
123
+ } )
117
124
}
118
125
}
119
126
You can’t perform that action at this time.
0 commit comments