Open Barbapapazes opened 10 months ago
Ideally this is not meant to be imported directly but accessed via PageMeta['layout']
, but I'm willing to consider some other options here for DX. (I think it shouldn't be named LayoutKey
if it's a public API, but there might be merit in exporting a type with all possible layout names...)
Environment
/
Reproduction
Use a simple nuxt starter, without the pages directory nor layouts. start your project and in the
.nuxt/types
, there is notlayouts.d.ts
.Describe the bug
When you use the
import type { LayoutKey } from '#build/types/layouts' in order to type a something in a module, you expect to have this all the time because end-user could not have enabled the
pages` directory and there is no way to know that.I suggest to have the
LayoutKey
set to undefined.Additional context
No response
Logs
No response