UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

10 lines (9 loc) 522 B
export { getConfigValueTyped }; export type { TypeAsString }; import type { ResolveTypeAsString } from '../../utils/hasProp.js'; import type { ConfigValue } from '../../types/PageConfig.js'; import type { ConfigNameBuiltIn } from '../../types/Config.js'; type TypeAsString = 'string' | 'boolean' | undefined; declare function getConfigValueTyped<Type extends TypeAsString = undefined>(configValue: ConfigValue, configName: ConfigNameBuiltIn, type?: Type): null | (ConfigValue & { value: ResolveTypeAsString<Type>; });