Skip to content

Commit 1151857

Browse files
committed
fix: refactors some internal types to prevent type issues with future Starlight versions
1 parent b076fa0 commit 1151857

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/starlight-links-validator/libs/i18n.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import type { StarlightUserConfig } from '@astrojs/starlight/types'
2+
13
import { ensureLeadingSlash, ensureTrailingSlash } from './path'
24
import type { Headings } from './remark'
3-
import type { StarlightUserConfig } from './validation'
45

56
export function getLocaleConfig(config: StarlightUserConfig): LocaleConfig | undefined {
67
if (!config.locales || Object.keys(config.locales).length === 0) return

packages/starlight-links-validator/libs/validation.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { statSync } from 'node:fs'
22
import { posix } from 'node:path'
33
import { fileURLToPath } from 'node:url'
44

5-
import type { StarlightPlugin } from '@astrojs/starlight/types'
5+
import type { StarlightUserConfig } from '@astrojs/starlight/types'
66
import type { AstroConfig, AstroIntegrationLogger } from 'astro'
77
import { bgGreen, black, blue, dim, green, red } from 'kleur/colors'
88
import picomatch from 'picomatch'
@@ -278,5 +278,3 @@ interface ValidationContext {
278278
outputDir: URL
279279
pages: Pages
280280
}
281-
282-
export type StarlightUserConfig = Parameters<StarlightPlugin['hooks']['setup']>['0']['config']

0 commit comments

Comments
 (0)