( selfSlot: number, primarySlot: number, dependencyResolverFn: o.Expression | null, loadingSlot: number | null, placeholderSlot: number | null, errorSlot: number | null, loadingConfig: o.Expression | null, placeholderConfig: o.Expression | null, enableTimerScheduling: boolean, sourceSpan: ParseSourceSpan | null, flags: ir.TDeferDetailsFlags | null, )
| 277 | } |
| 278 | |
| 279 | export function defer( |
| 280 | selfSlot: number, |
| 281 | primarySlot: number, |
| 282 | dependencyResolverFn: o.Expression | null, |
| 283 | loadingSlot: number | null, |
| 284 | placeholderSlot: number | null, |
| 285 | errorSlot: number | null, |
| 286 | loadingConfig: o.Expression | null, |
| 287 | placeholderConfig: o.Expression | null, |
| 288 | enableTimerScheduling: boolean, |
| 289 | sourceSpan: ParseSourceSpan | null, |
| 290 | flags: ir.TDeferDetailsFlags | null, |
| 291 | ): ir.CreateOp { |
| 292 | const args: Array<o.Expression> = [ |
| 293 | o.literal(selfSlot), |
| 294 | o.literal(primarySlot), |
| 295 | dependencyResolverFn ?? o.literal(null), |
| 296 | o.literal(loadingSlot), |
| 297 | o.literal(placeholderSlot), |
| 298 | o.literal(errorSlot), |
| 299 | loadingConfig ?? o.literal(null), |
| 300 | placeholderConfig ?? o.literal(null), |
| 301 | enableTimerScheduling ? o.importExpr(Identifiers.deferEnableTimerScheduling) : o.literal(null), |
| 302 | o.literal(flags), |
| 303 | ]; |
| 304 | |
| 305 | let expr: o.Expression; |
| 306 | while ( |
| 307 | (expr = args[args.length - 1]) !== null && |
| 308 | expr instanceof o.LiteralExpr && |
| 309 | expr.value === null |
| 310 | ) { |
| 311 | args.pop(); |
| 312 | } |
| 313 | |
| 314 | return call(Identifiers.defer, args, sourceSpan); |
| 315 | } |
| 316 | |
| 317 | export function enableIncrementalHydrationRuntime(sourceSpan: ParseSourceSpan | null): ir.CreateOp { |
| 318 | return call(Identifiers.enableIncrementalHydrationRuntime, [], sourceSpan); |
no test coverage detected
searching dependent graphs…