diff options
author | HiDeoo | 2023-07-19 17:24:16 +0200 |
---|---|---|
committer | GitHub | 2023-07-19 17:24:16 +0200 |
commit | 8415df63e502d517b68d7665d9257726e3dde246 (patch) | |
tree | a9b6a993ee82c36e58519a8e6563c19519c856aa | |
parent | b2d1d43bf5f0baf70df0997c4627e425bf4f7e3d (diff) | |
download | IT.starlight-8415df63e502d517b68d7665d9257726e3dde246.tar.gz IT.starlight-8415df63e502d517b68d7665d9257726e3dde246.tar.bz2 IT.starlight-8415df63e502d517b68d7665d9257726e3dde246.zip |
Fix build warnings with `verbatimModuleSyntax` TypeScript option (#360)
-rw-r--r-- | .changeset/silver-suits-relate.md | 5 | ||||
-rw-r--r-- | packages/starlight/components/Footer.astro | 2 | ||||
-rw-r--r-- | packages/starlight/utils/head.ts | 2 | ||||
-rw-r--r-- | packages/starlight/utils/navigation.ts | 2 | ||||
-rw-r--r-- | packages/starlight/utils/routing.ts | 4 | ||||
-rw-r--r-- | packages/starlight/utils/translations.ts | 2 |
6 files changed, 11 insertions, 6 deletions
diff --git a/.changeset/silver-suits-relate.md b/.changeset/silver-suits-relate.md new file mode 100644 index 00000000..de18d8a7 --- /dev/null +++ b/.changeset/silver-suits-relate.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Fix build warnings when using the TypeScript [`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax) compiler option diff --git a/packages/starlight/components/Footer.astro b/packages/starlight/components/Footer.astro index d040bb68..a8547415 100644 --- a/packages/starlight/components/Footer.astro +++ b/packages/starlight/components/Footer.astro @@ -1,6 +1,6 @@ --- import config from 'virtual:starlight/user-config'; -import { SidebarEntry, getPrevNextLinks } from '../utils/navigation'; +import { type SidebarEntry, getPrevNextLinks } from '../utils/navigation'; import type { StarlightDocsEntry } from '../utils/routing'; import type { LocaleData } from '../utils/slugs'; diff --git a/packages/starlight/utils/head.ts b/packages/starlight/utils/head.ts index 32da69fa..5e5b4bea 100644 --- a/packages/starlight/utils/head.ts +++ b/packages/starlight/utils/head.ts @@ -1,4 +1,4 @@ -import { HeadConfig, HeadConfigSchema, HeadUserConfig } from '../schemas/head'; +import { type HeadConfig, HeadConfigSchema, type HeadUserConfig } from '../schemas/head'; const HeadSchema = HeadConfigSchema(); diff --git a/packages/starlight/utils/navigation.ts b/packages/starlight/utils/navigation.ts index d096e9c1..18b68efa 100644 --- a/packages/starlight/utils/navigation.ts +++ b/packages/starlight/utils/navigation.ts @@ -2,7 +2,7 @@ import { basename, dirname } from 'node:path'; import config from 'virtual:starlight/user-config'; import { pathWithBase } from './base'; import { pickLang } from './i18n'; -import { Route, getLocaleRoutes, routes } from './routing'; +import { type Route, getLocaleRoutes, routes } from './routing'; import { localeToLang, slugToPathname } from './slugs'; import type { AutoSidebarGroup, diff --git a/packages/starlight/utils/routing.ts b/packages/starlight/utils/routing.ts index 7c06c45d..4cb32c7e 100644 --- a/packages/starlight/utils/routing.ts +++ b/packages/starlight/utils/routing.ts @@ -1,8 +1,8 @@ import type { GetStaticPathsItem } from 'astro'; -import { CollectionEntry, getCollection } from 'astro:content'; +import { type CollectionEntry, getCollection } from 'astro:content'; import config from 'virtual:starlight/user-config'; import { - LocaleData, + type LocaleData, localizedId, localizedSlug, slugToLocaleData, diff --git a/packages/starlight/utils/translations.ts b/packages/starlight/utils/translations.ts index 30164477..42b0ddcb 100644 --- a/packages/starlight/utils/translations.ts +++ b/packages/starlight/utils/translations.ts @@ -1,4 +1,4 @@ -import { CollectionEntry, getCollection } from 'astro:content'; +import { type CollectionEntry, getCollection } from 'astro:content'; import config from 'virtual:starlight/user-config'; import builtinTranslations from '../translations'; import { localeToLang } from './slugs'; |