Skip to content

Commit

Permalink
Make ResolveConfigFn type generic (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniFoldi authored Apr 2, 2024
1 parent d4302c2 commit 97aa141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-bottles-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@microlabs/otel-cf-workers": patch
---

Make ResolveConfigFn generic
2 changes: 1 addition & 1 deletion src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type FetchHandler = ExportedHandlerFetchHandler<unknown, unknown>
type ScheduledHandler = ExportedHandlerScheduledHandler<unknown>
type QueueHandler = ExportedHandlerQueueHandler

export type ResolveConfigFn = (env: any, trigger: Trigger) => TraceConfig
export type ResolveConfigFn<Env = any> = (env: Env, trigger: Trigger) => TraceConfig
export type ConfigurationOption = TraceConfig | ResolveConfigFn

export function isRequest(trigger: Trigger): trigger is Request {
Expand Down

0 comments on commit 97aa141

Please sign in to comment.