Closed leomp12 closed 1 year ago
https://docs.astro.build/en/guides/content-collections/ auto generated types (./astro/types.d.ts
) ? 🤔
Na real já tá funcionando, só faltava um Exclude<keyof _SettingsContent, 'metafields'>
em
export type SettingsContent = _SettingsContent &
Omit<typeof import('content/settings.json'), Exclude<keyof _SettingsContent, 'metafields'>>;
🙃
E Astro content collections só funciona do MD(x) , JSON dá um warning...
Each store may be able to overwrite types from https://github.com/ecomplus/cloud-commerce/blob/main/packages/storefront/src/lib/cms.d.ts with something like:
Probably reading self content JSON files. It's specially useful for metafields (
settings.metafields
). At least for metafields, it should also be included default at the Store template source.