From 1c3a4c14f7367dd67c973ea835aa974d8465ee44 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 27 Nov 2023 20:05:26 -0500 Subject: [PATCH] Reexport `Slot` so consumers need not import it from `@wry/context` (#613) --- src/context.ts | 1 + src/index.ts | 1 + src/tests/context.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/context.ts b/src/context.ts index 78b2228..fed6886 100644 --- a/src/context.ts +++ b/src/context.ts @@ -7,6 +7,7 @@ export function nonReactive(fn: () => R): R { return parentEntrySlot.withValue(void 0, fn); } +export { Slot } export { bind as bindContext, noContext, diff --git a/src/index.ts b/src/index.ts index 8333aa8..6b0ae5e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ export { nonReactive, setTimeout, asyncFromGen, + Slot, } from "./context.js"; // A lighter-weight dependency, similar to OptimisticWrapperFunction, except diff --git a/src/tests/context.ts b/src/tests/context.ts index 4f72013..41aff45 100644 --- a/src/tests/context.ts +++ b/src/tests/context.ts @@ -1,4 +1,3 @@ -import { Slot } from "@wry/context"; import * as assert from "assert"; import { wrap, @@ -6,6 +5,7 @@ import { asyncFromGen, noContext, nonReactive, + Slot, } from '../index.js'; describe("asyncFromGen", function () {