-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove internal
__sveltekit/
module declarations from types
Takes advantage of the fact that dts-buddy doesn't detect the ambient-private.d.ts module declarations (which arguably is a bit weird and could result in buggy behavior, but we can use it to our advantage here). fixes #11607
- Loading branch information
1 parent
e54d56e
commit 4fdea3b
Showing
8 changed files
with
110 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sveltejs/kit": patch | ||
--- | ||
|
||
fix: remove internal `__sveltekit/` module declarations from types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
declare global { | ||
const __SVELTEKIT_ADAPTER_NAME__: string; | ||
const __SVELTEKIT_APP_VERSION_FILE__: string; | ||
const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number; | ||
const __SVELTEKIT_DEV__: boolean; | ||
const __SVELTEKIT_EMBEDDED__: boolean; | ||
var Bun: object; | ||
var Deno: object; | ||
/** Internal version of $app/environment */ | ||
declare module '__sveltekit/environment' { | ||
/** | ||
* SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering. | ||
*/ | ||
export const building: boolean; | ||
/** | ||
* True during prerendering, false otherwise. | ||
*/ | ||
export const prerendering: boolean; | ||
/** | ||
* The value of `config.kit.version.name`. | ||
*/ | ||
export const version: string; | ||
export function set_building(): void; | ||
export function set_prerendering(): void; | ||
} | ||
|
||
export {}; | ||
/** Internal version of $app/paths */ | ||
declare module '__sveltekit/paths' { | ||
/** | ||
* A string that matches [`config.kit.paths.base`](https://kit.svelte.dev/docs/configuration#paths). | ||
* | ||
* Example usage: `<a href="{base}/your-page">Link</a>` | ||
*/ | ||
export let base: '' | `/${string}`; | ||
/** | ||
* An absolute path that matches [`config.kit.paths.assets`](https://kit.svelte.dev/docs/configuration#paths). | ||
* | ||
* > If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL. | ||
*/ | ||
export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; | ||
export let relative: boolean; | ||
export function reset(): void; | ||
export function override(paths: { base: string; assets: string }): void; | ||
export function set_assets(path: string): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
declare global { | ||
const __SVELTEKIT_ADAPTER_NAME__: string; | ||
const __SVELTEKIT_APP_VERSION_FILE__: string; | ||
const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number; | ||
const __SVELTEKIT_DEV__: boolean; | ||
const __SVELTEKIT_EMBEDDED__: boolean; | ||
var Bun: object; | ||
var Deno: object; | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters