You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Prevent type errors when optional @opentelemetry/api dependency isn't installed (#14949)
* fix: Prevent type errors when optional `@opentelemetry/api` dependency isn't installed
Fixes#14774
Better alternative to #14848
* Apply suggestion from @teemingc
---------
Co-authored-by: Tee Ming <[email protected]>
Copy file name to clipboardExpand all lines: packages/kit/src/exports/public.d.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,12 @@ import {
25
25
LayoutParamsasAppLayoutParams,
26
26
ResolvedPathname
27
27
}from'$app/types';
28
-
import{Span}from'@opentelemetry/api';
29
28
30
29
export{PrerenderOption}from'../types/private.js';
31
30
31
+
// @ts-ignore this is an optional peer dependency so could be missing. Written like this so dts-buddy preserves the ts-ignore
32
+
typeSpan=import('@opentelemetry/api').Span;
33
+
32
34
/**
33
35
* [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
// @ts-ignore this is an optional peer dependency so could be missing. Written like this so dts-buddy preserves the ts-ignore
9
+
typeSpan=import('@opentelemetry/api').Span;
10
+
9
11
/**
10
12
* [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
0 commit comments