This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const syntaxBigInt = require("@babel/plugin-syntax-bigint").default | |
module.exports = function (babel) { | |
const types = babel.types | |
const visitor = { | |
BigIntLiteral(path) { | |
const value = path.node.value | |
path.replaceWith( | |
types.callExpression(types.identifier("BigInt"), [types.StringLiteral(value)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as D from "effect/Deferred" | |
import * as DU from "effect/Duration" | |
import * as T from "effect/Effect" | |
import * as FID from "effect/FiberId" | |
import { pipe } from "effect/Function" | |
import * as HM from "effect/HashMap" | |
import * as O from "effect/Option" | |
/** | |
* Given a function (key: K) => Effect<R, E, A> this DataLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (api) { | |
api.cache(true) | |
return { | |
presets: ["babel-preset-expo"], | |
plugins: ["./scripts/babel-plugin-transform-bigint-to-jsbi"] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as DU from "@effect/data/Duration" | |
import { pipe } from "@effect/data/Function" | |
import * as HM from "@effect/data/HashMap" | |
import * as O from "@effect/data/Option" | |
import * as D from "@effect/io/Deferred" | |
import * as T from "@effect/io/Effect" | |
import * as FID from "@effect/io/Fiber/Id" | |
/** | |
* Given a function (key: K) => Effect<R, E, A> this DataLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as ENV from "@effect/data/Context" | |
import { Tag } from "@effect/data/Context" | |
import * as DU from "@effect/data/Duration" | |
import { pipe } from "@effect/data/Function" | |
import * as O from "@effect/data/Option" | |
import * as D from "@effect/io/Deferred" | |
import * as T from "@effect/io/Effect" | |
import type * as EX from "@effect/io/Exit" | |
import * as FID from "@effect/io/Fiber/Id" | |
import * as HUB from "@effect/io/Hub" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Effect from "@effect/io/Effect"; | |
import * as Chunk from "@effect/data/Chunk"; | |
import * as Deferred from "@effect/io/Deferred"; | |
import * as Option from "@effect/data/Option"; | |
import { pipe } from "@effect/data/Function"; | |
interface Request<E, A> extends Effect.Effect<never, E, A> {} | |
interface RequestEntry<A extends Request<any, any>> { | |
request: A; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Show } from "@fp-ts/codec/Show" | |
import * as C from "@fp-ts/data/Context" | |
interface Meta<P> { | |
meta: P | |
} | |
interface MetaSchema<C> extends Meta<unknown> { | |
_tag: unknown | |
_C?: C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as T from "@effect/core/io/Effect" | |
import * as SE from "@effect/core/stm/TSemaphore" | |
import * as HM from "@tsplus/stdlib/collections/HashMap" | |
import { pipe } from "@tsplus/stdlib/data/Function" | |
import * as O from "@tsplus/stdlib/data/Maybe" | |
/** | |
* Given a function (key: K) => Effect<R, E, A> this DataLoader | |
* batches and caches requests such as concurrent lookups | |
* for the same key cannot happen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as T from "@effect/core/io/Effect" | |
import type * as EX from "@effect/core/io/Exit" | |
import * as FID from "@effect/core/io/FiberId" | |
import * as HUB from "@effect/core/io/Hub" | |
import type * as RU from "@effect/core/io/Runtime" | |
import * as S from "@effect/core/stream/Stream" | |
import * as C from "@effect-ts/core/Case" | |
import { pipe } from "@tsplus/stdlib/data/Function" | |
import * as O from "@tsplus/stdlib/data/Maybe" | |
import * as ENV from "@tsplus/stdlib/service/Env" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as T from "@effect/core/io/Effect" | |
import type * as EX from "@effect/core/io/Exit" | |
import * as FID from "@effect/core/io/FiberId" | |
import * as HUB from "@effect/core/io/Hub" | |
import * as S from "@effect/core/stream/Stream" | |
import * as C from "@effect-ts/core/Case" | |
import { pipe } from "@tsplus/stdlib/data/Function" | |
import * as O from "@tsplus/stdlib/data/Maybe" | |
import * as ENV from "@tsplus/stdlib/service/Env" | |
import { Tag } from "@tsplus/stdlib/service/Tag" |
NewerOlder