Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ResolveConfigFn type generic #108

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

DaniFoldi
Copy link
Contributor

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.

Copy link
Collaborator

@jahands jahands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

@jahands jahands merged commit 97aa141 into evanderkoogh:main Apr 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants