When setting up a new worker today, I copied the otel config resolver from another project. Unfortunately, the secret containing the api key had a different name there than I intended having in the new worker.
ResolveConfigFn previously had env: any, which means ts didn't catch this error. It now accepts an optional type parameter which allows users to typecheck their config resolver function better.
Fixes # [insert GH issue number(s)].
What this PR solves / how to test:
When setting up a new worker today, I copied the otel config resolver from another project. Unfortunately, the secret containing the api key had a different name there than I intended having in the new worker.
ResolveConfigFn previously had
env: any
, which means ts didn't catch this error. It now accepts an optional type parameter which allows users to typecheck their config resolver function better.