Skip to content

Commit

Permalink
fix: remove ImportString from pageContext.config type
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jun 5, 2024
1 parent def1f6c commit 1b7b761
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions vike/shared/page-configs/Config/PageContextConfig.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
export type { PageContextConfig }

import type { VikePackages } from '../../VikeNamespace.js'
import type { ConfigBuiltIn } from '../Config.js'
import type { ConfigBuiltIn, ImportString } from '../Config.js'
import type { Combine, IsNotEmpty, XOR5 } from './helpers.js'

// Like the type `Config` but meant for pageContext.config
type WithoutImportString<T> = { [K in keyof T]: Exclude<T[K], ImportString> }

type PageContextConfig = ConfigBuiltIn &
// https://vike.dev/meta#typescript
Vike.ConfigResolved &
Omit<Vike.Config, keyof Vike.ConfigResolved> &
WithoutImportString<
Omit<
// https://vike.dev/meta#typescript
Vike.Config,
keyof Vike.ConfigResolved
>
> &
// TODO/eventually: remove the whole XOR logic
(ConfigVikePackagesNotEmptyXor extends true ? ConfigVikePackagesIntersection : ConfigVikePackagesCombined)

Expand Down

0 comments on commit 1b7b761

Please sign in to comment.