-
Notifications
You must be signed in to change notification settings - Fork 544
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
Can the runtime dependency on types be moved to devDependencies #1787
Comments
The problem is that If some typescript user installs the instrumentation (maybe indirect via autoinstrumentations meta package) but not the express types typescript complains. Therefore to move it into dev-deps it's additionally needed to cleanup the public API surface as described here. |
The description of
Could we limit the export interface SimpleExpressRequest {
// some props here
}
export type ExpressRequestInfo<T = SimpleExpressRequest> = {
request: T;
route: string;
layerType: ExpressLayerType;
}; |
As long as the dependency to express is broken it should be fine. The instrumentation itself doesn't need the hooks therefore I think no need for a But for sure the docs need to mention what is actually given to the hook. |
@Flarna @pichlermarc I can prepare a PR. you can assign it to me |
What version of OpenTelemetry are you using?
1.6.0
What version of Node are you using?
18.17.0
What did you do?
The inclusion of @types/express as a runtime dependency causes some typing issues for us in mocked tests.
I found this discussion about why the types were moved originally, but i was wondering if the types could be moved back at this point
What did you expect to see?
type defs as a dev dependency
What did you see instead?
type defs as a runtime dependency
Additional context
fwiw, i added this to my package json and things still seem okay
The text was updated successfully, but these errors were encountered: