* 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 <chewteeming01@gmail.com>
--- /dev/null
+---
+'@sveltejs/kit': patch
+---
+
+fix: prevent type errors when optional `@opentelemetry/api` dependency isn't installed
LayoutParams as AppLayoutParams,
ResolvedPathname
} from '$app/types';
-import { Span } from '@opentelemetry/api';
export { PrerenderOption } from '../types/private.js';
+// @ts-ignore this is an optional peer dependency so could be missing. Written like this so dts-buddy preserves the ts-ignore
+type Span = import('@opentelemetry/api').Span;
+
/**
* [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.
*/
import type { SvelteConfig } from '@sveltejs/vite-plugin-svelte';
import type { StandardSchemaV1 } from '@standard-schema/spec';
import type { RouteId as AppRouteId, LayoutParams as AppLayoutParams, ResolvedPathname } from '$app/types';
- import type { Span } from '@opentelemetry/api';
+ // @ts-ignore this is an optional peer dependency so could be missing. Written like this so dts-buddy preserves the ts-ignore
+ type Span = import('@opentelemetry/api').Span;
+
/**
* [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.
*/