@effect/io
Advanced tools
Comparing version 0.0.33 to 0.0.34
@@ -186,3 +186,5 @@ "use strict"; | ||
{ | ||
return core.suspendSucceed(() => core.map(Chunk.singleton)(fromFlatLoop(flat, prefix, op.config, true))).traced(trace); | ||
return core.suspendSucceed(() => { | ||
return core.map(Chunk.singleton)(fromFlatLoop(flat, prefix, op.config, true)); | ||
}).traced(trace); | ||
} | ||
@@ -189,0 +191,0 @@ case 9: |
@@ -8,4 +8,3 @@ /** | ||
*/ | ||
/// <reference types="requestidlecallback" /> | ||
export {}; | ||
//# sourceMappingURL=main-thread.d.ts.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.yieldBackgroundOrContinue = yieldBackgroundOrContinue; | ||
/// <reference path="../../node_modules/@types/requestidlecallback/index.d.ts" /> | ||
/** @internal */ | ||
@@ -54,3 +53,5 @@ function whenReady() { | ||
const loop = () => { | ||
// @ts-expect-error | ||
if (typeof requestIdleCallback !== "undefined") { | ||
// @ts-expect-error | ||
idleCallbackId = requestIdleCallback(deadline => { | ||
@@ -76,3 +77,5 @@ reset(); | ||
}; | ||
// @ts-expect-error | ||
if (typeof requestAnimationFrame !== "undefined") { | ||
// @ts-expect-error | ||
requestAnimationFrame(cb); | ||
@@ -109,3 +112,5 @@ } else { | ||
lastCallTime = now; | ||
lastResult = now >= calculateDeadline() || typeof navigator !== "undefined" && navigator.scheduling?.isInputPending?.() === true; | ||
lastResult = now >= calculateDeadline() || | ||
// @ts-expect-error | ||
typeof navigator !== "undefined" && navigator.scheduling?.isInputPending?.() === true; | ||
if (lastResult) { | ||
@@ -154,2 +159,3 @@ state.frameTimeElapsed = true; | ||
channel.port2.postMessage(undefined); | ||
// @ts-expect-error | ||
channel.port1.onmessage = () => { | ||
@@ -189,4 +195,6 @@ channel.port1.close(); | ||
} | ||
// @ts-expect-error | ||
if (typeof requestIdleCallback === "undefined") { | ||
await new Promise(resolve => requestNextTask(resolve)); | ||
// @ts-expect-error | ||
if (typeof navigator !== "undefined" && navigator.scheduling?.isInputPending?.() === true) { | ||
@@ -193,0 +201,0 @@ await schedule(); |
{ | ||
"name": "@effect/io", | ||
"version": "0.0.33", | ||
"version": "0.0.34", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -294,8 +294,8 @@ import type * as Config from "@effect/io/Config" | ||
case OpCodes.OP_SEQUENCE: { | ||
return core.suspendSucceed(() => | ||
pipe( | ||
return core.suspendSucceed(() => { | ||
return pipe( | ||
fromFlatLoop(flat, prefix, op.config, true), | ||
core.map(Chunk.singleton) | ||
) | ||
).traced(trace) as Effect.Effect<never, ConfigError.ConfigError, Chunk.Chunk<A>> | ||
}).traced(trace) as Effect.Effect<never, ConfigError.ConfigError, Chunk.Chunk<A>> | ||
} | ||
@@ -302,0 +302,0 @@ case OpCodes.OP_TABLE: { |
@@ -9,5 +9,2 @@ /** | ||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference | ||
/// <reference path="../../node_modules/@types/requestidlecallback/index.d.ts" /> | ||
/** @internal */ | ||
@@ -38,2 +35,3 @@ type WhenReady<T> = { | ||
frameWorkStartTime: number | undefined | ||
// @ts-expect-error | ||
idleDeadline: IdleDeadline | undefined | ||
@@ -90,3 +88,5 @@ } | ||
const loop = (): void => { | ||
// @ts-expect-error | ||
if (typeof requestIdleCallback !== "undefined") { | ||
// @ts-expect-error | ||
idleCallbackId = requestIdleCallback((deadline) => { | ||
@@ -121,3 +121,5 @@ reset() | ||
// @ts-expect-error | ||
if (typeof requestAnimationFrame !== "undefined") { | ||
// @ts-expect-error | ||
requestAnimationFrame(cb) | ||
@@ -175,2 +177,3 @@ } else { | ||
lastResult = now >= calculateDeadline() || | ||
// @ts-expect-error | ||
(typeof navigator !== "undefined" && navigator.scheduling?.isInputPending?.() === true) | ||
@@ -237,2 +240,3 @@ | ||
channel.port2.postMessage(undefined) | ||
// @ts-expect-error | ||
channel.port1.onmessage = (): void => { | ||
@@ -285,5 +289,7 @@ channel.port1.close() | ||
// @ts-expect-error | ||
if (typeof requestIdleCallback === "undefined") { | ||
await new Promise<void>((resolve) => requestNextTask(resolve)) | ||
// @ts-expect-error | ||
if (typeof navigator !== "undefined" && navigator.scheduling?.isInputPending?.() === true) { | ||
@@ -290,0 +296,0 @@ await schedule() |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5226065
104453