From 1883451b37a836ff37dc2ad9a0895342ff32569f Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Wed, 23 Oct 2024 17:44:07 -0500 Subject: [PATCH] export async helpers --- .github/workflows/npm-release.yml | 2 +- lib/call.ts | 9 +++++++++ lib/mod.ts | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml index 93a92a73d..e78eb0094 100644 --- a/.github/workflows/npm-release.yml +++ b/.github/workflows/npm-release.yml @@ -41,7 +41,7 @@ jobs: NPM_VERSION: ${{steps.vars.outputs.version}} - name: Publish - run: npm publish --access=public + run: npm publish --access=public --tag=next working-directory: ./build/npm env: NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} diff --git a/lib/call.ts b/lib/call.ts index 371553ffe..8840849c7 100644 --- a/lib/call.ts +++ b/lib/call.ts @@ -60,6 +60,15 @@ export interface Callable< * or plain function to call as part of this operation */ +export function call( + fn: (...args: TArgs) => Promise, +): Operation; +export function call( + fn: (...args: TArgs) => T, +): Operation; +export function call( + fn: (...args: TArgs) => Operation, +): Operation; export function call( callable: Callable, ...args: TArgs diff --git a/lib/mod.ts b/lib/mod.ts index 9fa806ba9..37a6a4c1f 100644 --- a/lib/mod.ts +++ b/lib/mod.ts @@ -20,3 +20,4 @@ export * from "./events.ts"; export * from "./abort-signal.ts"; export * from "./main.ts"; export * from "./with-resolvers.ts"; +export * from "./async.ts";