aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Silver <14016168+silversquirl@users.noreply.github.com> 2023-10-07 03:22:38 +0100
committerGravatar GitHub <noreply@github.com> 2023-10-06 19:22:38 -0700
commit48635fd9105c0f7cc2a47a2584123a175b43a04b (patch)
tree3931668d2c1e3f60b16a50edb516c7d6a0e77389
parent456d6be02228c2e755a70d89a5f9e24f751398ec (diff)
downloadbun-48635fd9105c0f7cc2a47a2584123a175b43a04b.tar.gz
bun-48635fd9105c0f7cc2a47a2584123a175b43a04b.tar.zst
bun-48635fd9105c0f7cc2a47a2584123a175b43a04b.zip
[types] allow onLoad plugin callbacks to return undefined (#6346)
Returning undefined simply falls through to the next plugin, or to the default loader. This is defined by esbuild, and supported by Bun, but the types don't reflect it properly.
-rw-r--r--packages/bun-types/bun.d.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts
index d8d8fd204..04e59a51b 100644
--- a/packages/bun-types/bun.d.ts
+++ b/packages/bun-types/bun.d.ts
@@ -3214,7 +3214,7 @@ declare module "bun" {
loader: Loader;
}
- type OnLoadResult = OnLoadResultSourceCode | OnLoadResultObject;
+ type OnLoadResult = OnLoadResultSourceCode | OnLoadResultObject | undefined;
type OnLoadCallback = (
args: OnLoadArgs,
) => OnLoadResult | Promise<OnLoadResult>;